From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UJ/JHtEIdWP4IRkAWB0awg (envelope-from ) for ; Wed, 16 Nov 2022 10:59:13 -0500 Received: by simark.ca (Postfix, from userid 112) id 7A2661E126; Wed, 16 Nov 2022 10:59:13 -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=T/ClVJ6N; 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=unavailable 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 296901E11F for ; Wed, 16 Nov 2022 10:59:13 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A384A395B46E for ; Wed, 16 Nov 2022 15:59:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A384A395B46E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668614352; bh=8cGgjcqzIBx7yk2xmLTD1CJ4tkExXk4OV0WebU9vJPQ=; h=To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=T/ClVJ6Nwlb9uZ+CQy/bTPlyZagx5Cfr0pilKRf9vuulDB4iGVGbyoKHG1OCCeO6P VvNK+HXDRkxzDKEVAyqM1FExYqRWwyzhH05J9U2Vcnd1EE4BxrjelK8PPV/uywHI2x PMEJe/M9USRIAX+7KNWG4rnL3eJF6B2vbAt4xqIo= Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 29F70395B408 for ; Wed, 16 Nov 2022 15:58:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 29F70395B408 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AGFPijL003325; Wed, 16 Nov 2022 15:56:47 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kw2gdgx81-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 15:56:46 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2AGFRHJk010462; Wed, 16 Nov 2022 15:56:46 GMT Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kw2gdgx7g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 15:56:46 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2AGFonc0027513; Wed, 16 Nov 2022 15:56:45 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma05wdc.us.ibm.com with ESMTP id 3kt34a3dbn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 15:56:44 +0000 Received: from smtpav01.dal12v.mail.ibm.com ([9.208.128.133]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2AGFujwq35127816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Nov 2022 15:56:46 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D322958061; Wed, 16 Nov 2022 15:56:43 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 358FB58057; Wed, 16 Nov 2022 15:56:43 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.163.52.7]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 16 Nov 2022 15:56:43 +0000 (GMT) Message-ID: <26d98e31c92b259aa24c63e28fb8efdf86d46376.camel@us.ibm.com> To: Lancelot SIX , cel@us.ibm.com Cc: Ulrich Weigand , "gdb-patches@sourceware.org" , "tdevries@suse.de" , Simon Marchi , "kevinb@redhat.com" , "will_schmidt@vnet.ibm.com" , "blarsen@redhat.com" Date: Wed, 16 Nov 2022 07:56:42 -0800 In-Reply-To: <20221116101958.aadx4r5f72ub2emw@ubuntu.lan> References: <2db5ad69b32f4cda9c53b252ad37cd783f827c14.camel@de.ibm.com> <7f476265-c6a9-9fcf-ce13-ff550ea5e6f6@suse.de> <6ed2cf1714e5b8dc386e66b634b540efdf828ed5.camel@de.ibm.com> <2466b7efc91dd4964add9a0d7ce4cd47678f5800.camel@us.ibm.com> <6cb9fd038eefd825bd0e66c80da3771e4a512b68.camel@us.ibm.com> <20221116101958.aadx4r5f72ub2emw@ubuntu.lan> 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: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: IDrvdMTe2xnK01OkDwrbJdopb1sajtfV X-Proofpoint-ORIG-GUID: GtRY5hXtgkN2cq4jOSFa77dDnm4ceC8- Subject: RE: [PATCH 2/2 ver 3] PowerPC, fix support for printing the function return value for non-trivial values. 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-16_03,2022-11-16_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 clxscore=1011 priorityscore=1501 bulkscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 mlxlogscore=763 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211160108 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 Wed, 2022-11-16 at 10:20 +0000, Lancelot SIX wrote: > Hi Carl, > > > s RETURN_VALUE_STRUCT_CONVENTION, > > attempt to determine the address of the return buffer. */ > > - enum return_value_convention return_value; > > - struct gdbarch *gdbarch = get_frame_arch (callee_frame); > > + if (sm->function != NULL) > > I know that Ulrich has already approved the patch, but to follow the > coding standard the NULL should be replaced by nullptr. If this is > not > too much trouble and is OK with maintainers, I think it would be nice > to > do this minor tweak. > > > + { > > + enum return_value_convention return_value; > > + struct gdbarch *gdbarch = get_frame_arch (callee_frame); > > > > - struct type * val_type > > - = check_typedef (sm->function->type ()->target_type ()); > > + struct type * val_type > > + = check_typedef (sm->function->type ()->target_type ()); > > > > - return_value = gdbarch_return_value (gdbarch, > > - read_var_value (sm->function, > > NULL, > > - callee_frame), > > - val_type, NULL, NULL, NULL); > > + return_value = gdbarch_return_value (gdbarch, > > + read_var_value (sm- > > >function, NULL, > > + callee_frame > > ), > > + val_type, NULL, NULL, NULL); > > While at it, those NULL could probably be updated I guess. I think at this point it is probably best to do a new clean up patch particularly since the other NULLs are not part of the fix patch. I will go ahead and commit the fix and then put together a clean up patch to address all the NULLs. Thanks for letting me know about it. Carl Love