From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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 (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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding : subject; s=pp1; bh=8cGgjcqzIBx7yk2xmLTD1CJ4tkExXk4OV0WebU9vJPQ=; b=QnW+Tf9xAztI6Y6o4beWLnddwmz8+CubtnaA2WHV8QfPwnPyjsVOpIvFTTwXho+EeVFK Wv9sAiwA9bhQSd3sjdVDI3LGijJfLUZfxlIAwbW0WWrwg3E6NHCIomnMgfggZyA7EtE5 w4BshaNkpML6svbtk4jM1fyGBfkbGZS0pd6W0RJ5o3fpJmEIe8TcPtxdIye8KdVstuKF DjYBCRSeoy8bV8z5G3//DQtSk2qGaYqo2eUZtqlT8YBUz5SNUTQ1KdFaK6MDyaadH731 qFzbv04/MEhl5XD17pJ33dqvM+C4Ls73OrZ2IMRfKZ/UCn54ShoOAaLfe1eXLln86xs4 0w== 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> From: Carl Love 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-Spam-Status: No, score=-5.4 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 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