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 5EC8F385E02E for ; Wed, 8 Jun 2022 15:33:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5EC8F385E02E Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 258F1Gbx008339; Wed, 8 Jun 2022 15:33:53 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gjut547w9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jun 2022 15:33:53 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 258F0hk5003611; Wed, 8 Jun 2022 15:33:52 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gjut547uc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jun 2022 15:33:52 +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 258FLIiB023985; Wed, 8 Jun 2022 15:33:48 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 3gfy19v5ee-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jun 2022 15:33:48 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 258FXlhv60752204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Jun 2022 15:33:47 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B3C83124052; Wed, 8 Jun 2022 15:33:47 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 104EC124058; Wed, 8 Jun 2022 15:33:47 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.211.57.135]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 8 Jun 2022 15:33:46 +0000 (GMT) Message-ID: <356aac133a99cf293d7f4673412224d29b4a53be.camel@us.ibm.com> Subject: Re: [PATCH V5] PowerPC: fix for gdb.base/eh_return.exp From: Carl Love To: will schmidt , Pedro Alves , Kevin Buettner , gdb-patches@sourceware.org Date: Wed, 08 Jun 2022 08:33:46 -0700 In-Reply-To: <6d82b4b8f30815f5dd98c001a8fe25632eb14a5a.camel@vnet.ibm.com> References: <76bea9ad010a71ea5e2c7fd78f818bdb399810a6.camel@us.ibm.com> <20220506110826.5e16c8b6@f35-zws-1> <70a877cc-2f35-3924-6717-9d519c2730c5@palves.net> <099c8f8d8729a0051f83a034d62c18f03c789167.camel@vnet.ibm.com> <37d2a4b6a57b62662f0417f123bda6ba48066554.camel@vnet.ibm.com> <998d3f4859f16b73afd5103b682246643fef6d42.camel@us.ibm.com> <8ee42814763cc0e245c93f62c40cdaaad3ac65b2.camel@us.ibm.com> <6d82b4b8f30815f5dd98c001a8fe25632eb14a5a.camel@vnet.ibm.com> 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: z4L2NjgSoVKE3ikMzdXzrgQ1yDCQlH-p X-Proofpoint-ORIG-GUID: YK8tgB-mVOFG0zm3IQTNQ0B1koXRFvL_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-08_05,2022-06-07_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 mlxlogscore=999 priorityscore=1501 suspectscore=0 mlxscore=0 malwarescore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206080065 X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 08 Jun 2022 15:33:57 -0000 Will, Pedro, Kevin, GDB maintainers: I have made the additional fixes to the comments and the setting of the clang options as mentioned by Will in version 4. I do not have an environment where gdb can be built with clang. But I did check that the clang options are properly passed to the compile command. Unfortunately, extensive testing of gdb built with XLC and clang are beyond the scope of this patch as I do not have access to such systems. Per the comments from Kevin, the patch was updated to check for the gcc and xlc compilers on PowerPC. The patch was also tested and verified on AIX which uses the gcc compiler to build gdb. The attempt to build gdb using the xlc compiler fails due to unrelated compiler errors. The xlc options to disable the Traceback Table was verified but that was it. I have updated the patch per the comments from Will. The new version of the patch uses a PowerPC specific gcc option to suppress the generation of the Traceback Table information. The Traceback information for this function is contained in the .long statements following the last instruction in the function. The Traceback table consists of a series of bit fields. The assembler tries to interpret the Traceback Table as instructions. If the bits in the Traceback Table happen to match a known instruction, the assembler will print a bogus instruction, otherwise the assembler just prints the bits using the .long statement. Unfortunately, the disassembler does not know how to locate the Traceback Table information at the end of a function. With this patch, the Traceback Table is disabled, so the last instruction of the function is accurately found. Previously, the break point was set at the last .long statement which gdb will never reach. The test now passes as gdb successfully executes to the identified last instruction. Note, the use of the gcc mtraceback option is not valid on other architectures. I have tested the patch on Linux Power 10 with gcc, AIX with the gcc and Intel with gcc. Please let me know if this patch is acceptable. Thanks for the input and help with the patch. Carl Love ------------------------------------------------------------------