From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id TBTNMczjnGKEegoAWB0awg (envelope-from ) for ; Sun, 05 Jun 2022 13:11:40 -0400 Received: by simark.ca (Postfix, from userid 112) id C2BEE1E221; Sun, 5 Jun 2022 13:11:40 -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=GN6h/Mdo; 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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 428281E143 for ; Sun, 5 Jun 2022 13:11:40 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4E12E385356C for ; Sun, 5 Jun 2022 17:11:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E12E385356C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1654449097; bh=8oR+7dfoLLyR5Lz+ymZ2v6GUMC+Dzz/7auwvhy77yBs=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GN6h/MdohugohDd6BtuNqwguXkjKejtIhfKjuiUZc5rYFkXTn6CtRZv/DrCz6z+7r nhR0XX41YBsaandYnH6hT73yzOgHJiSVcdt7C1rhCJZyeVO4b1AYUfh2v9tr9nz+Zn VEUA2EVmCXlXYrMGXklY1LyHbkI+MFLNOcUu9GYE= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id E5A37385356C for ; Sun, 5 Jun 2022 17:10:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E5A37385356C Received: from fencepost.gnu.org ([2001:470:142:3::e]:46898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxtmD-000070-Gi; Sun, 05 Jun 2022 13:10:57 -0400 Received: from [87.69.77.57] (port=3984 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxtmC-0000dQ-P6; Sun, 05 Jun 2022 13:10:57 -0400 Date: Sun, 05 Jun 2022 20:10:44 +0300 Message-Id: <83tu8z8297.fsf@gnu.org> To: Philippe Waroquiers In-Reply-To: <20220605165759.2433530-1-philippe.waroquiers@skynet.be> (message from Philippe Waroquiers via Gdb-patches on Sun, 5 Jun 2022 18:57:59 +0200) Subject: Re: [RFAv2] Show locno for 'multi location' breakpoint hit msg+conv var $bkptno $locno. References: <20220605165759.2433530-1-philippe.waroquiers@skynet.be> 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: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > Date: Sun, 5 Jun 2022 18:57:59 +0200 > From: Philippe Waroquiers via Gdb-patches > > diff --git a/gdb/NEWS b/gdb/NEWS > index 960f90b4387..88671a1c86d 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -34,6 +34,20 @@ > whitespace from each line before using the string as the help > output. > > +* When a breakpoint with multiple locations is hit, GDB now also prints the location Please make the lines here shorter, so that they fit on a 80-column screen. Also, can we please use the terminology defined by a recent Pedro's patch, i.e. use "code locations", not just "locations"? > +* When a breakpoint is hit, GDB now sets the convenience variables $bkpno and > + $locno to the hit breakpoint number and location number. ^^^^^^ That's a typo, right? > + This allows to disable the last hit breakpoint using for example > + (gdb) disable $bkptno > + or > + (gdb) disable $bkptno.$locno The two alternatives above are not equivalent, right? The text could be interpreted to mean they do the same. > + ** The 'breakpoint-hit' stopped reason async record now contains an optional field Suggest to reword: The async record stating the stopped reason 'breakpoint-hit' now contains ... > +@vindex $bkptno@r{, convenience variable} > +@vindex $locno@r{, convenience variable} > +When your program stops on a breakpoint, the convenience variables > +@samp{$bkptno} and @samp{$locno} are respectively set to the number of > +the encountered breakpoint and the number of the breakpoint location: ^^^^^^^^^^^^^^^^^^^ "breakpoint's code location" > +If the encountered breakpoint has only one location, @samp{$locno} is set to 1: ^^^^^^^^ "code location" > +These variables can typically be used in a breakpoint command list. > +(@pxref{Break Commands, ,Breakpoint Command Lists}). For example, as > +part of the breakpoint command list, you can disable completely the > +encountered breakpoint using @samp{disable $bkptno} or disable the > +specific encountered breakpoint location using @samp{disable > +$bkptno.$locno}. So how does $bkptno differ from $bpnum? > +Inside a command list, you can use the command > +@smallexample > +disable $bkptno > +@end smallexample > +to disable the encountered breakpoint. I'd say use @kbd{..} here instead of @smallexample, and include the command inline in the text. > +If your breakpoint has several locations, the command > +@smallexample > +disable $bkptno.$locno > +@end smallexample > +will disable the specific breakpoint location encountered. Likewise here. > +For a @samp{breakpoint-hit} stopped reason, when the breakpoint > +encountered has multiple locations, the field @samp{bkptno} is > +followed by the field @samp{locno}. This is a backward-incompatible change, no? Does it require bumping the version of the MI protocol? Thanks.