From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id AL66Ns1k0mRvjzsAWB0awg (envelope-from ) for ; Tue, 08 Aug 2023 11:52:45 -0400 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=fs2VHeuV; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DCC531E0BB; Tue, 8 Aug 2023 11:52:45 -0400 (EDT) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C7DE01E028 for ; Tue, 8 Aug 2023 11:52:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F38563858289 for ; Tue, 8 Aug 2023 15:52:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F38563858289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691509963; bh=Gro0OVEvL2AfLKZTaR6BVVt0USfv+epAYq2KZ32hcho=; 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=fs2VHeuVFmiM3RD9XiREK5tt8DVyo/BamRvAJCWhC6+e1BUV2qBYEAKuDlP1AfYcA eAy4iFnv0ny3mPH05abkMs/VUmD6x84eTegUN1IcHggitR0T3ZaKk6c5K1UuxSZQ/Z f4OU0zt7VK3NrLpTSCDsH/rqhjQrfr4oSOdz+z9U= Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 324CF3858D20 for ; Tue, 8 Aug 2023 15:52:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 324CF3858D20 Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 378Fmgc0010194; Tue, 8 Aug 2023 15:52:17 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3sbr9m8w6d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Aug 2023 15:52:16 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 378FckZQ030129; Tue, 8 Aug 2023 15:52:16 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3sbr9m8w66-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Aug 2023 15:52:16 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 378EdliD001802; Tue, 8 Aug 2023 15:52:15 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([172.16.1.68]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3sa3f1qbm6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Aug 2023 15:52:15 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 378FqEJ230867770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Aug 2023 15:52:15 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 988C55805D; Tue, 8 Aug 2023 15:52:14 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 155EA58061; Tue, 8 Aug 2023 15:52:14 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.61.185.149]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 8 Aug 2023 15:52:13 +0000 (GMT) Message-ID: <0dbc6a31553898a4c95c90d770539d6bee459cb4.camel@us.ibm.com> To: Guinevere Larsen , Simon Marchi , gdb-patches@sourceware.org, UlrichWeigand , pedro@palves.net Cc: luis.machado@arm.com, cel@us.ibm.com Date: Tue, 08 Aug 2023 08:52:13 -0700 In-Reply-To: <4771b172-902b-5995-d32d-494e6d6f5341@redhat.com> References: <3a46ac42391707325ee2aab900d13bce05c8a0b8.camel@us.ibm.com> <4771b172-902b-5995-d32d-494e6d6f5341@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-ORIG-GUID: lILxx_6RNDYD04068IYd_fGI-FLzZpXV X-Proofpoint-GUID: IB8JEicNK8VlCA48un51jfrCk4yFi1rZ Subject: RE: [PATCH 2/2 ver 7] Fix reverse stepping multiple contiguous PC ranges over the line table. X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-08_13,2023-08-08_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 mlxscore=0 mlxlogscore=807 adultscore=0 bulkscore=0 priorityscore=1501 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308080140 X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, 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 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" Guinevere: On Tue, 2023-08-08 at 16:14 +0200, Guinevere Larsen wrote: > > infrun_debug_printf ("keep going"); > > + > > + if (execution_direction == EXEC_REVERSE) > > + { > > + CORE_ADDR stop_pc = ecs->event_thread->stop_pc (); > > + > > + /* Make sure the stop_pc is set to the beginning of the > > line. */ > > + if (stop_pc != ecs->event_thread->control.step_range_start) > > + { > > + stop_pc = update_line_range_start (stop_pc, ecs); > > + ecs->event_thread->control.step_range_start = stop_pc; > pretty small nit, but I think it is better to just use > > ecs->event_thread->control.step_range_start > = update_line_range_start (stop_pc, ecs); > > Just because it is kind of weird, to see the step_range_start being > set > to stop pc, and made me do a double take :) > Yea, I may have done it like that to make it easier to print the new stop_pc value when developing the patch. Honestly, at this point I don't recall for sure. Anyway, I updated the code as follows: if (execution_direction == EXEC_REVERSE) { CORE_ADDR stop_pc = ecs->event_thread->stop_pc (); /* Make sure the stop_pc is set to the beginning of the line. */ if (stop_pc != ecs->event_thread->control.step_range_start) ecs->event_thread->control.step_range_start = update_line_range_start (stop_pc, ecs); } keep_going (ecs); I made the change locally and will include it in any future versions/commits. Not sure it is worth sending out a new version with the change at the moment. Lets see if I get any additional comments from the community first. Thanks for mentioning that. Carl