From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 27FF63858421 for ; Mon, 14 Nov 2022 19:38:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 27FF63858421 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=us.ibm.com Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.5) with ESMTP id 2AEJN0rh026086 for ; Mon, 14 Nov 2022 19:38:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=AAmmRKUzBPuVnUM9CzGi7HJMzrFSG8rH9ootKGR+rnc=; b=phTqsXQ0/hOVK6BRwu5wxuFxihfcPmOLYdnvlzahl3kpUJflJoEVCn2L3JSvt286+Gdf jESurY84aex0Unv++Twhpviau7UpcJAv5vnWzleIGjMXspdnafHUb3c/K95/fHmtkYvt T2uaGwCBHI2vusTZnc1gFycT3KJ3PqrkW4zBPcudddJa1aYqPQ8iGwevQUoIUVidnW9F PxItupd6AaGGYjh31+0mKbwInC6dR8ASEk78ybFaY0MIijZi8sHAHwaXp2ZtvfPLkIin rgWBdPeC0/suPcqJtbt+co2GT1O7zXpD+d/iOnNOOTDxECDmyGBvFvUjuA4f3sHvIRGR FQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3kuuskgbf8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 14 Nov 2022 19:38:47 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2AEJOIQF031336 for ; Mon, 14 Nov 2022 19:38:47 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3kuuskgbey-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Nov 2022 19:38:47 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2AEJac4l022152; Mon, 14 Nov 2022 19:38:46 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma04wdc.us.ibm.com with ESMTP id 3kt349fqvd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Nov 2022 19:38:46 +0000 Received: from smtpav06.wdc07v.mail.ibm.com ([9.208.128.115]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2AEJcjME17105508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Nov 2022 19:38:46 GMT Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6C3F65804E; Mon, 14 Nov 2022 19:38:45 +0000 (GMT) Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B19CB58055; Mon, 14 Nov 2022 19:38:44 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.163.52.7]) by smtpav06.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 14 Nov 2022 19:38:44 +0000 (GMT) Message-ID: <6c9b02ead51bc49bc452a4a213ab9afcb3cce06e.camel@us.ibm.com> Subject: Re: [PATCH 1/2 ver 3] PowerPC, function ppc64_sysv_abi_return_value add missing return value convention From: Carl Love To: Ulrich Weigand , "gdb-patches@sourceware.org" Cc: "kevinb@redhat.com" , "will_schmidt@vnet.ibm.com" , "blarsen@redhat.com" , cel@us.ibm.com Date: Mon, 14 Nov 2022 11:38:44 -0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: YjyneTVS5GOV6fov1NWGhnHN6KOb3Wcg X-Proofpoint-ORIG-GUID: UwPRvdAfEk3cYWyzexWW8FsjHKOhRcBG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-14_13,2022-11-11_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 bulkscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 mlxscore=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211140137 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 2022-11-14 at 16:45 +0000, Ulrich Weigand wrote: > Carl Love wrote: > > > ------------------------------- > > PowerPC, function ppc64_sysv_abi_return_value add missing return > > value convention > > > > This patch address five testcase failures in gdb.cp/non-trivial- > > retval.exp. > > The following commit resulted in the five testcases failures on > > PowerPC. The > > value returned by the function is being reported incorrectly. > > > > commit b1718fcdd1d2a5c514f8ee504ba07fb3f42b8608 > > Author: Andrew Burgess > > Date: Mon Dec 13 16:56:16 2021 +0000 > > > > gdb: on x86-64 non-trivial C++ objects are returned in memory > > > > Fixes PR gdb/28681. It was observed that after using the > > `finish` > > command an incorrect value was displayed in some > > cases. Specifically, > > this behaviour was observed on an x86-64 target. > > > > The function: > > > > enum return_value_convention > > ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value > > *function, > > struct type *valtype, struct regcache > > *regcache, > > gdb_byte *readbuf, const gdb_byte > > *writebuf) > > > > should return RETURN_VALUE_STRUCT_CONVENTION if the valtype->code() > > is > > TYPE_CODE_STRUCT and if the language_pass_by_reference is not > > trivially_copyable. > > > > This patch adds the need code to return the value > > RETURN_VALUE_STRUCT_CONVENTION in the case of this case. > > This still has the typos Kevin pointed out. > > > With this patch, the five test cases still fail but with the > > message "Value > > returned has type: A. Cannot determine contents". The PowerPC ABI > > stores the > > address of the buffer containing the function return value in > > register r3 on > > entry to the function. However, the PowerPC ABI does not guarentee > > that r3 > > will not be modified in the function. So when the function > > returns, the return > > buffer address cannot be reliably obtained from register r3. Thus > > the message > > "Cannot determine contents" is appropriate in this case. > > OK with the above typos fixed. > Yes, I had fixed the typos once. But it seems I didn't get the patch updated on all of the systems where I was testing/developing the patch and inadvertently lost the updates to this patch. I have fixed the typos again and updated the patch on the various test/development systems. Sorry about that. Carl