From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mNKADTJeD2QIYg4AWB0awg (envelope-from ) for ; Mon, 13 Mar 2023 13:32:34 -0400 Received: by simark.ca (Postfix, from userid 112) id 29DFD1E223; Mon, 13 Mar 2023 13:32:34 -0400 (EDT) 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=ttjzn/Kg; 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=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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 887301E0D2 for ; Mon, 13 Mar 2023 13:32:32 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E0FAA385840E for ; Mon, 13 Mar 2023 17:32:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0FAA385840E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678728751; bh=kj7V8V/5qhQ++bS1CZ5ojl9EUgLf+iw7Qob3tfsjQzo=; 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=ttjzn/Kg0pxliWyhZmqgHvKkRlF1Q/ISwH2Fgdc/toQyUjtJ8we/iluilYoVYE9rY ylttbLh0G27e1IPTNZObx7acpVHEUDca9NhfIkbKTeDdvdWIZu4uga8vm7Zfa4YzkS YrNIaD9fEupE93VteFqJgxfPzoILmmiOuwA2qfug= Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 1C0903858D1E for ; Mon, 13 Mar 2023 17:32:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C0903858D1E 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 32DHCSJZ002567; Mon, 13 Mar 2023 17:32:08 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pa8178f9e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 17:32:07 +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 32DHDZi8010170; Mon, 13 Mar 2023 17:32:06 GMT Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pa8178f2n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 17:32:06 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32DGpje6028156; Mon, 13 Mar 2023 17:31:35 GMT Received: from smtprelay04.dal12v.mail.ibm.com ([9.208.130.102]) by ppma01dal.us.ibm.com (PPS) with ESMTPS id 3p8h98ar9m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 17:31:35 +0000 Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101]) by smtprelay04.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32DHVXTb12059370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Mar 2023 17:31:33 GMT Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C5FD358051; Mon, 13 Mar 2023 17:31:33 +0000 (GMT) Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4FD205805A; Mon, 13 Mar 2023 17:31:33 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.163.92.223]) by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 13 Mar 2023 17:31:33 +0000 (GMT) Message-ID: <8b84b68491e638529052f1c98314cf6ba64bc8ee.camel@us.ibm.com> Subject: Re: [PATCH 2/2 ] PowerPC: fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp To: Ulrich Weigand , "gdb-patches@sourceware.org" , Bruno Larsen , "tdevries@suse.de" , "pedro@palves.net" Cc: cel@us.ibm.com Date: Mon, 13 Mar 2023 10:31:32 -0700 In-Reply-To: <27caff18b9e133583ba147a21cdd997a0a580828.camel@de.ibm.com> References: <78b464a1-e32e-c3da-85e4-7bfc322cc29f@redhat.com> <7848e9858b54e33e399b871774ffc0b5058c1736.camel@us.ibm.com> <65d44121-65f7-a212-79ec-07ce53c15ecb@suse.de> <9fe94c0979cb40979b0dea7693a901c2d9f66164.camel@us.ibm.com> <59417813-eb4a-baf8-4e5d-e225d6732f71@suse.de> <7a494157-494f-6adf-d533-bf373b0f054f@redhat.com> <71aa635593df0677811afb85409aa190bcfa4f6a.camel@us.ibm.com> <15864a6b87b25c93e99a28149f23138267735f2a.camel@us.ibm.com> <041f62e9f26fd4a536bc90c34f072985582e6237.camel@de.ibm.com> <46c2c756475ba5923d7eed97996632a08285dd42.camel@us.ibm.com> <65861786-069e-53a1-ca17-a525b6629c95@suse.de> <5be0c849abeef84d34a6ff255fb2705ca5dcb035.camel@us.ibm.com> <27caff18b9e133583ba147a21cdd997a0a580828.camel@de.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: m_TEjNjmaagotk4MGmvgPsVvccbnx5kA X-Proofpoint-ORIG-GUID: u87A8tVVk9SvswBzGX2R3q4rjOtHhskr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-13_09,2023-03-13_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=686 phishscore=0 priorityscore=1501 mlxscore=0 spamscore=0 adultscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303130136 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" Ulrich: On Mon, 2023-03-13 at 14:16 +0000, Ulrich Weigand wrote: > Carl Love wrote: > > > This patch fixes the reverse-finish command on PowerPC. The > > command > > now works the same as on other architectures, specifically > > X86. There > > are no functional changes for other architectures. The patch > > includes > > a new testcase to verify the reverse-finish command works correctly > > with the multiple entry points supported by PowerPC. > > This looks good to me in general, just one cosmetic issue: > > > - /* Set a step-resume at the function's entry point. Once > > that's > > - hit, we'll do one more step backwards. */ > > + if ((pc < alt_entry_point) || (pc > entry_point)) > > + { > > + /* We are in the body of the function. Set a breakpoint to > > go back to > > + the normal entry point. */ > > symtab_and_line sr_sal; > > - sr_sal.pc = sal.pc; > > + sr_sal.pc = entry_point; > > sr_sal.pspace = get_frame_program_space (frame); > > - insert_step_resume_breakpoint_at_sal (gdbarch, > > - sr_sal, null_frame_id); > > - > > - proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT); > > + insert_step_resume_breakpoint_at_sal (gdbarch, sr_sal, > > + null_frame_id); > > } > > + > > else > > - { > > - /* We're almost there -- we just need to back up by one more > > - single-step. */ > > - tp->control.step_range_start = tp->control.step_range_end = > > 1; > > - proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT); > > - } > > + /* We are either at one of the entry points or between the > > entry points. > > + If we are not at the alt_entry point, go back to the > > alt_entry_point > > + If we at the normal entry point step back one instruction, > > when we > > + stop we will determine if we entered via the entry point or > > the > > + alternate entry point. If we are at the alternate entry > > point, > > + single step back to the function call. */ > > + tp->control.step_range_start = tp->control.step_range_end = 1; > > + > > + proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT); > > There's still a bunch of unnecessary changes in there (changes > in formatting, moving the "proceed" call, etc.). It would be > preferable to not have those in. OK, I went back and looked again to see what else I could do to remove "unecessary changes", etc in gdg/infcmd.c. I took out the move of the proceed call from the if/else branches to a single call after the if/else statement. I moved the declarations to the top with the other declarations. I moved the new if statement up a little. These changes make the changes in the if/else are easier to read. I made a few other cosmetic changes to get the diff to be as minimal as I could. I hope this addresses your concerns. There are no functional changes. I retested the patch. I will post an updated version of the patch. Carl