From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailsec105.isp.belgacom.be (mailsec105.isp.belgacom.be [195.238.20.101]) by sourceware.org (Postfix) with ESMTPS id 343EF3857025 for ; Sat, 4 Jun 2022 17:37:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 343EF3857025 X-ExtLoop: 1 X-IPAS-Result: =?us-ascii?q?A2AGAQDIlpti/yFRiNkNTYEJCYFGiUiRDQOcZoF8CwEBA?= =?us-ascii?q?QEBAQEBAQlCBAEBhQIChUcmNQgOAQIEAQEBAQMCAwEBAQEBAQMBAQYBAQEBA?= =?us-ascii?q?QEGBAGBG4UvgnspAYNjAQEBAQIBIwQLAVYLGAICJgICVwYBhgSrDHp/MoEBh?= =?us-ascii?q?G6DK4FlgREshz6DCYQbN4FVRIQ/PoQOhAyCZQRfkV+ESx07AxwtNBKBIXEBC?= =?us-ascii?q?AYGBwoFMgYCDBgUBAITElMdAhIFBwocDhQcJBkMDwMSAxEBBwILEggVLAgDA?= =?us-ascii?q?gMIAwIDLgIDFwkHCgMdCAocEhAUAgQTHgsIAxkfLAkCBA4DRQgLCgMRBAMTG?= =?us-ascii?q?AsWCBAEBgMJLw0oCwMFDw8BBgMGAgUFAQMgAxQDBScHAyEHCyYNDQQcBx0DA?= =?us-ascii?q?wUmAwICGwcCAgMCBhcGAgJxCiYNCAQIBBwdJRAFAgcxBQQvAh4EBQYRCQIWA?= =?us-ascii?q?gYEBQIEBBYCAhIIAggnGwcWGR0ZAQVdBgsJIRwpCwYFBhYDI3EFCj4PKTU2P?= =?us-ascii?q?QYiAR2YF2sGAUoPGSSBKRs+ASQQNb54gXg0B4NRgT0GDJc4CYcAMahblmggo?= =?us-ascii?q?hGFAoFjAYISbYM8UCiOV44bgS4CBgEKAQEDCY1MgUl/AQE?= IronPort-PHdr: A9a23:L0k2PhVL78w1hKmZmQByqeRJ/XjV8KyIUjF92vMcY1JmTK2v8tzYM VDF4r011RmVB96duqIP0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Mc5Ax9ZJhko7690cq7MBHhHPxOirX5VI3KNDUO+lHIEGgI1+HfKlPbdxEWutQttp tdTw== X-IronPort-Anti-Spam-Filtered: true X-ProximusIPWarmup: true Received: from 33.81-136-217.adsl-dyn.isp.belgacom.be (HELO [192.168.1.19]) ([217.136.81.33]) by relay.proximus.be with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2022 19:37:01 +0200 Message-ID: <9aea098aad32c41c887aed717222b1f563ab7c72.camel@skynet.be> Subject: Re: [RFA] Show locno for 'multi location' breakpoint hit msg+conv var $bkptno $locno. From: Philippe Waroquiers To: Keith Seitz , gdb-patches@sourceware.org Date: Sat, 04 Jun 2022 19:37:02 +0200 In-Reply-To: <24da89de-d36f-53c7-fe69-a8c7a1c38caf@redhat.com> References: <20220417155311.3487509-1-philippe.waroquiers@skynet.be> <874988bef430ed6e239e74a4a94eb2ad13175f4a.camel@skynet.be> <1001e780cc1d9f7a85923d6707bf17f063b8da90.camel@skynet.be> <24da89de-d36f-53c7-fe69-a8c7a1c38caf@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, 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: Sat, 04 Jun 2022 17:37:07 -0000 On Fri, 2022-06-03 at 13:40 -0700, Keith Seitz wrote: > I've really only got some pretty minor questions to ask and a nit or > two to mention. Nothing serious. Thanks for the review. > > > > Also, when a breakpoint is reached, the convenience variables > > > > $bkptno and $locno are set to the encountered breakpoint number > > > > and location number. > > We have convenience variables for when we set breakpoints ($bpnum) > and tracepoints ($tpnum). Should we re-use those or would that lead > to user confusion? AFAICT, we only use those variables when a > {break,trace}point is created or modified. This seems like it could > be a natural extension of the utility of those variables. > > I am not asking for any changes, I'm genuinely curious if reusing > these existing convenience vars would be desirable in your opinion. The drawback of re-using $bpnum is that this might break the logic of some existing scripts/command sequences, e.g. in the following case: add a breakpoint (so setting $bpnum) do whatever so that another breakpoint is encountered do whatever with $bpnum e.g. delete it or disable it. If in the second step, $bpnum is changed, then the third step will change of behaviour: instead of deleting or disabling the last set breakpoint, it will delete or disable the last encountered breakpoint. > > > > > +static bool > > > > +has_multiple_locations (int num) > > At one time, we used to append "_p" to these types of predicate- > style functions. Are we abandoning this practice? [Mind you, > this is simply a meta-question. Again, I am not asking for > any changes.] It looks to me that we now have a mix of functions with or without _p. Maybe the _p convention was invented when bool functions were in fact returning an int ? > > > > + { > > > > + warning (_("location number not found for breakpoint %d address %p."), > > > > + b->number, paddress (bl->gdbarch, bl->address)); > > Doesn't paddress require %s (or even nicer: %ps with a styled_string ())? The other usages of paddress use %s, I will fix this. > > > >   # > > > > @@ -699,7 +708,13 @@ proc runto { linespec args } { > > > >    } > > > >    return 1 > > > >    } > > > > - -re "Breakpoint \[0-9\]*, \[0-9xa-f\]* in .*$gdb_prompt $" { > > > > + -re "Breakpoint \[0-9\]*, \[0-9xa-f\]* in .*$gdb_prompt $" { > > > > + if { $print_pass } { > > > > + pass $test_name > > > > + } > > > > + return 1 > > > > + } > > > > + -re "Breakpoint \[0-9\]*\.\[0-9\]*, \[0-9xa-f\]* in .*$gdb_prompt $" { > > > >    if { $print_pass } { > > > >    pass $test_name > > > >    } > > It doesn't seem that we make a distinction here between the "Breakpoint N" vs "Breakpoint N.M" > cases. Is it possible to merge these two branches into one using bkptno_numopt_re? > [super super minor nit] Will look at this. > > Thank you so much for your patience. I hope a global maintainer with approval > authority will follow-up. Thanks for the review, I will prepare an RFA v2 handling your comments and the comments of Eli. Philippe