From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qF8dCl2ZcmP1bhgAWB0awg (envelope-from ) for ; Mon, 14 Nov 2022 14:39:09 -0500 Received: by simark.ca (Postfix, from userid 112) id 15CB61E124; Mon, 14 Nov 2022 14:39:09 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=KioOSJVo; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9AAAD1E11E for ; Mon, 14 Nov 2022 14:39:08 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 065FB38460AD for ; Mon, 14 Nov 2022 19:39:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 065FB38460AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668454748; bh=AAmmRKUzBPuVnUM9CzGi7HJMzrFSG8rH9ootKGR+rnc=; h=Subject:To:Cc:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=KioOSJVo2VC1Sb35WEJBjw5VKPC3PBsoooyb99Rr8TM+KOGyNdDvO506t5HN1Iu8S wACwctKnH7CwOu7UcC5Z9mG3Erl572NsqcgQM8Sk2DSvTgykRYN/gDAEqYh2Vs8w8V Jll8KWmJuJKHMBQIHnCt7AwRPapvUXL6A1EKehCk= 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 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 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 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-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Carl Love via Gdb-patches Reply-To: Carl Love Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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