public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/12464] New: breakpoint number cannot be accessed from "commands" body
@ 2011-02-04 18:45 rtc at gmx dot de
2022-11-19 13:54 ` [Bug breakpoints/12464] " cvs-commit at gcc dot gnu.org
2022-11-19 14:03 ` philippe.waroquiers at skynet dot be
0 siblings, 2 replies; 3+ messages in thread
From: rtc at gmx dot de @ 2011-02-04 18:45 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12464
Summary: breakpoint number cannot be accessed from "commands"
body
Product: gdb
Version: unknown
Status: NEW
Severity: enhancement
Priority: P2
Component: breakpoints
AssignedTo: unassigned@sourceware.org
ReportedBy: rtc@gmx.de
It would be nice to have a convenience variable inside a "commands" body that
contains the number of the associated breakpoint. I imagine something like:
break
commands
printf "This is breakpoint %d\n", $_break
end
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug breakpoints/12464] breakpoint number cannot be accessed from "commands" body
2011-02-04 18:45 [Bug breakpoints/12464] New: breakpoint number cannot be accessed from "commands" body rtc at gmx dot de
@ 2022-11-19 13:54 ` cvs-commit at gcc dot gnu.org
2022-11-19 14:03 ` philippe.waroquiers at skynet dot be
1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-19 13:54 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=12464
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Philippe Waroquiers
<philippe@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=78805ff8aecf0a8c828fb1e2c344fa3a56655120
commit 78805ff8aecf0a8c828fb1e2c344fa3a56655120
Author: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Date: Sat May 23 22:27:28 2020 +0200
Show locno for 'multi location' breakpoint hit msg+conv var $_hit_bbnum
$_hit_locno PR breakpoints/12464
This implements the request given in PR breakpoints/12464.
Before this patch, when a breakpoint that has multiple locations is
reached,
GDB printed:
Thread 1 "zeoes" hit Breakpoint 1, some_func () at somefunc1.c:5
This patch changes the message so that bkpt_print_id prints the precise
encountered breakpoint:
Thread 1 "zeoes" hit Breakpoint 1.2, some_func () at somefunc1.c:5
In mi mode, bkpt_print_id also (optionally) prints a new table field
"locno":
locno is printed when the breakpoint hit has more than one location.
Note that according to the GDB user manual node 'GDB/MI Development and
Front
Ends', it is ok to add new fields without changing the MI version.
Also, when a breakpoint is reached, the convenience variables
$_hit_bpnum and $_hit_locno are set to the encountered breakpoint number
and location number.
$_hit_bpnum and $_hit_locno can a.o. be used in the command list of a
breakpoint, to disable the specific encountered breakpoint, e.g.
disable $_hit_bpnum.$_hit_locno
In case the breakpoint has only one location, $_hit_locno is set to
the value 1, so as to allow a command such as:
disable $_hit_bpnum.$_hit_locno
to disable the breakpoint even when the breakpoint has only one location.
This also fixes a strange behaviour: when a breakpoint X has only
one location,
enable|disable X.1
is accepted but transforms the breakpoint in a multiple locations
breakpoint having only one location.
The changes in RFA v4 handle the comments of Tom Tromey:
- Changed convenience var names from $bkptno/$locno to
$_hit_bpnum/$_hit_locno.
- updated the tests and user manual accordingly.
User manual also explictly describes that $_hit_locno is set to 1
for a breakpoint with a single location.
- The variable values are now set in bpstat_do_actions_1 so that
they are set for silent breakpoints, and when several breakpoints
are hit at the same time, that the variables are set to the printed
breakpoint.
The changes in RFA v3 handle the additional comments of Eli:
GDB/NEW:
- Use max 80-column
- Use 'code location' instead of 'location'.
- Fix typo $bkpno
- Ensure that disable $bkptno and disable $bkptno.$locno have
each their explanation inthe example
- Reworded the 'breakpoint-hit' paragraph.
gdb.texinfo:
- Use 'code location' instead of 'location'.
- Add a note to clarify the distinction between $bkptno and $bpnum.
- Use @kbd instead of examples with only one command.
Compared to RFA v1, the changes in v2 handle the comments given by
Keith Seitz and Eli Zaretskii:
- Use %s for the result of paddress
- Use bkptno_numopt_re instead of 2 different -re cases
- use C@t{++}
- Add index entries for $bkptno and $locno
- Added an example for "locno" in the mi interface
- Added examples in the Break command manual.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug breakpoints/12464] breakpoint number cannot be accessed from "commands" body
2011-02-04 18:45 [Bug breakpoints/12464] New: breakpoint number cannot be accessed from "commands" body rtc at gmx dot de
2022-11-19 13:54 ` [Bug breakpoints/12464] " cvs-commit at gcc dot gnu.org
@ 2022-11-19 14:03 ` philippe.waroquiers at skynet dot be
1 sibling, 0 replies; 3+ messages in thread
From: philippe.waroquiers at skynet dot be @ 2022-11-19 14:03 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=12464
philippe.waroquiers at skynet dot be changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
CC| |philippe.waroquiers@skynet.
| |be
--- Comment #2 from philippe.waroquiers at skynet dot be ---
Variables $_hit_bpnum and $_hit_locno provides the needed functionality.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-19 14:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-04 18:45 [Bug breakpoints/12464] New: breakpoint number cannot be accessed from "commands" body rtc at gmx dot de
2022-11-19 13:54 ` [Bug breakpoints/12464] " cvs-commit at gcc dot gnu.org
2022-11-19 14:03 ` philippe.waroquiers at skynet dot be
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).