From: Eli Zaretskii via Gdb-patches <gdb-patches@sourceware.org>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFAv2] Show locno for 'multi location' breakpoint hit msg+conv var $bkptno $locno.
Date: Sun, 05 Jun 2022 20:10:44 +0300 [thread overview]
Message-ID: <83tu8z8297.fsf@gnu.org> (raw)
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)
> Date: Sun, 5 Jun 2022 18:57:59 +0200
> From: Philippe Waroquiers via Gdb-patches <gdb-patches@sourceware.org>
>
> 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.
next prev parent reply other threads:[~2022-06-05 17:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-05 16:57 Philippe Waroquiers via Gdb-patches
2022-06-05 17:10 ` Eli Zaretskii via Gdb-patches [this message]
2022-06-05 19:09 ` Philippe Waroquiers via Gdb-patches
2022-06-05 19:26 ` Eli Zaretskii via Gdb-patches
2022-06-05 19:44 ` Philippe Waroquiers via Gdb-patches
2022-06-06 12:44 ` Eli Zaretskii via Gdb-patches
2022-06-07 13:05 ` Eli Zaretskii via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83tu8z8297.fsf@gnu.org \
--to=gdb-patches@sourceware.org \
--cc=eliz@gnu.org \
--cc=philippe.waroquiers@skynet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox