From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Wpi4EGx9xWOtMRgAWB0awg (envelope-from ) for ; Mon, 16 Jan 2023 11:38:04 -0500 Received: by simark.ca (Postfix, from userid 112) id 355E41E128; Mon, 16 Jan 2023 11:38:04 -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=TVnkhRkb; 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=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 BC00F1E0D3 for ; Mon, 16 Jan 2023 11:38:03 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 525B2385842B for ; Mon, 16 Jan 2023 16:38:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 525B2385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673887082; bh=bb8Jxa2tHgkBGSGGWsFWELasdar8c+LvzTKXHSSdgAA=; 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=TVnkhRkbunuoG0ufy/dEuzSicaGoLR9jSyD/Rxf+n8ZsdcDPbzjNB0i1LmgPSDreP BMwFUmaAXNdAjJB8/+RMGNlUt8ojLSYuDuXgabOn1TElLAatcPgyi9s6Z/zuo1dsTi 9ckgZWni95FykxCjTWwrAoy2Y02lGZbxMmiR423s= Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 7DA9B3858D33 for ; Mon, 16 Jan 2023 16:37:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7DA9B3858D33 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30GF7wRt023610 for ; Mon, 16 Jan 2023 16:37:41 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n54r9rwbr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 16 Jan 2023 16:37:41 +0000 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30GFwUlF030006 for ; Mon, 16 Jan 2023 16:37:41 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n54r9rwbj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Jan 2023 16:37:40 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30GG2qe2019293; Mon, 16 Jan 2023 16:37:40 GMT Received: from smtprelay07.wdc07v.mail.ibm.com ([9.208.129.116]) by ppma03dal.us.ibm.com (PPS) with ESMTPS id 3n3m17595c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Jan 2023 16:37:40 +0000 Received: from smtpav04.dal12v.mail.ibm.com (smtpav04.dal12v.mail.ibm.com [10.241.53.103]) by smtprelay07.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30GGbcwP3080796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Jan 2023 16:37:38 GMT Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 279345804E; Mon, 16 Jan 2023 16:37:38 +0000 (GMT) Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE2C55805A; Mon, 16 Jan 2023 16:37:37 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.163.12.142]) by smtpav04.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 16 Jan 2023 16:37:37 +0000 (GMT) Message-ID: <7e6d33146665d21ab8c0dd0ac6956a7a488860a0.camel@us.ibm.com> Subject: Re: [PATCH 0/2 version 2] fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp To: Bruno Larsen , Ulrich Weigand , "will_schmidt@vnet.ibm.com" , gdb-patches@sourceware.org Cc: cel@us.ibm.com Date: Mon, 16 Jan 2023 08:37:37 -0800 In-Reply-To: <011768e8-2b76-f8ed-1174-fbaa020b15e7@redhat.com> References: <51c4bfc82ac72e475e10577dc60e4d75fa48767e.camel@de.ibm.com> <3ea97a8aa9cccb39299adde682f92055d1986ab3.camel@us.ibm.com> <53878e37c6e57de1d04d9c9960c5d0a74324ee6e.camel@us.ibm.com> <50474aa92ba82eff05cdc8f49001eae56be29670.camel@us.ibm.com> <89331c26795e3f7743e1e068dce43b3c2dd53008.camel@us.ibm.com> <071f24ecf9b3a2bbbe8fee7db77492eb55c5f3ff.camel@us.ibm.com> <1d9b21914354bef6a290ac30673741e722e11757.camel@de.ibm.com> <3e3c9c40f07ab01c79fe10915e76ffa187c42ad9.camel@us.ibm.com> <122f5d2d3db9ef1979b0f8da927d005f32bba82c.camel@us.ibm.com> <011768e8-2b76-f8ed-1174-fbaa020b15e7@redhat.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: --qleO0InMgQT_vkg0zKueYejVcFO-wE X-Proofpoint-ORIG-GUID: Jpoq7n2Z3TYurPvLSMn1VoACBi8K2qcp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-16_14,2023-01-13_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 impostorscore=0 bulkscore=0 clxscore=1015 suspectscore=0 spamscore=0 mlxlogscore=759 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301160123 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" GDB maintainers: Version 2: Addressed various comments from Bruno Larsen. This patch set fixes a couple of issues with the gdb.reverse tests finish-precsave.exp and finish-reverse.exp. The first issue is when doing a reverse-finish command from a function, gdb should stop at the first instruction of the source code line where the call was made. The behavior should look the same as doing a reverse-next from the first line of the function. Currently gdb stops at the last instruction in the caller source code line. Issuing reverse-step or reverse-next stops at the first instruction in the same source code line. It then requires a second reverse step or next command to reach the previous source code line in the caller. It should only require one reverse step or next command to reach the previous line. The first patch in this series fixes the above issue on X86. A number of additional testcases require updating since the output is slightly different or the test case no longer needs to issue the two reverse step/next instructions. The step_until proceedure in test gdb.reverse/step-indirect-call-thunk.exp was moved to lib/gdb.exp and renamed cmd_until. The proceedure is used to test the reverse-finish command when returning from the entry point of the function. The second issue with the reverse-finish command is that on PowerPC the reverse-finish doesn't stop at the function call. The issue is PowerPC uses two entry points. PowerPC calls the two entry points the local entry point (LEP) and the global entry point (GEP). The LEP is normally used when calling a function. The GEP is used when the table of contents (TOC) needs to be setup before continuing execution at the LEP. GDB is not handling the two entry points correctly. The second patch fixes the reverse-finish behavior on PowerPC. On systems that don't use two entry points the LEP and the GEP are the same. A new testcase is added to verify the reverse-finish command works correctly for X86 when returning from the body of a function and from the entry point. Note, the finish_backward function must handle the two scenarios slightly differently. The new testcase is expanded in the PPC patch to add tests for the two scenarios for a function called via the GEP. The initial set of tests added in the X86 patch take care of the function being called via the LEP on PowerPC. The patches have been tested on PowerPC and X86 with no new regressions. Please let me know if the patches are acceptable for mainline. Thanks.