diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2024-02-22 15:29:11 +0800 |
---|---|---|
committer | Tiezhu Yang <yangtiezhu@loongson.cn> | 2024-02-26 19:19:58 +0800 |
commit | 4a4fd10d1707424b9b13aa4af0cec7590c086ea0 (patch) | |
tree | 9e8a9ef2dffa8b88aab491c8339f471dc6af6d43 /gdb/doc | |
parent | 8b53ea2ace9d1fe7a04b3009bf75f5296e0428dc (diff) | |
download | gdb-4a4fd10d1707424b9b13aa4af0cec7590c086ea0.zip gdb-4a4fd10d1707424b9b13aa4af0cec7590c086ea0.tar.gz gdb-4a4fd10d1707424b9b13aa4af0cec7590c086ea0.tar.bz2 |
gdb: Modify the output of "info breakpoints" and "delete breakpoints"
The output of "info breakpoints" includes breakpoint, watchpoint,
tracepoint, and catchpoint if they are created, so it should show
all the four types are deleted in the output of "info breakpoints"
to report empty list after "delete breakpoints".
It should also change the output of "delete breakpoints" to make it
clear that watchpoints, tracepoints, and catchpoints are also being
deleted. This is suggested by Guinevere Larsen, thank you.
$ make check-gdb TESTS="gdb.base/access-mem-running.exp"
$ gdb/gdb gdb/testsuite/outputs/gdb.base/access-mem-running/access-mem-running
[...]
(gdb) break main
Breakpoint 1 at 0x12000073c: file /home/loongson/gdb.git/gdb/testsuite/gdb.base/access-mem-running.c, line 32.
(gdb) watch global_counter
Hardware watchpoint 2: global_counter
(gdb) trace maybe_stop_here
Tracepoint 3 at 0x12000071c: file /home/loongson/gdb.git/gdb/testsuite/gdb.base/access-mem-running.c, line 27.
(gdb) catch fork
Catchpoint 4 (fork)
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x000000012000073c in main at /home/loongson/gdb.git/gdb/testsuite/gdb.base/access-mem-running.c:32
2 hw watchpoint keep y global_counter
3 tracepoint keep y 0x000000012000071c in maybe_stop_here at /home/loongson/gdb.git/gdb/testsuite/gdb.base/access-mem-running.c:27
not installed on target
4 catchpoint keep y fork
Without this patch:
(gdb) delete breakpoints
Delete all breakpoints? (y or n) y
(gdb) info breakpoints
No breakpoints or watchpoints.
(gdb) info breakpoints 3
No breakpoint or watchpoint matching '3'.
With this patch:
(gdb) delete breakpoints
Delete all breakpoints, watchpoints, tracepoints, and catchpoints? (y or n) y
(gdb) info breakpoints
No breakpoints, watchpoints, tracepoints, or catchpoints.
(gdb) info breakpoints 3
No breakpoint, watchpoint, tracepoint, or catchpoint matching '3'.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-by: Kevin Buettner <kevinb@redhat.com>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/gdb.texinfo | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 7980548..34cd567 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -4343,7 +4343,8 @@ running or not, what process it is, and why it stopped. @end table @menu -* Breakpoints:: Breakpoints, watchpoints, and catchpoints +* Breakpoints:: Breakpoints, watchpoints, tracepoints, + and catchpoints * Continuing and Stepping:: Resuming execution * Skipping Over Functions and Files:: Skipping over functions and files @@ -4721,15 +4722,15 @@ optionally be surrounded by spaces. @cindex @code{$_} and @code{info breakpoints} @item info breakpoints @r{[}@var{list}@dots{}@r{]} @itemx info break @r{[}@var{list}@dots{}@r{]} -Print a table of all breakpoints, watchpoints, and catchpoints set and -not deleted. Optional argument @var{n} means print information only -about the specified breakpoint(s) (or watchpoint(s) or catchpoint(s)). +Print a table of all breakpoints, watchpoints, tracepoints, and catchpoints set +and not deleted. Optional argument @var{n} means print information only about +the specified breakpoint(s) (or watchpoint(s) or tracepoint(s) or catchpoint(s)). For each breakpoint, following columns are printed: @table @emph @item Breakpoint Numbers @item Type -Breakpoint, watchpoint, or catchpoint. +Breakpoint, watchpoint, tracepoint, or catchpoint. @item Disposition Whether the breakpoint is marked to be disabled or deleted when hit. @item Enabled or Disabled @@ -5650,10 +5651,11 @@ in @ref{Location Specifications}. @kindex delete @kindex d @r{(@code{delete})} @item delete @r{[}breakpoints@r{]} @r{[}@var{list}@dots{}@r{]} -Delete the breakpoints, watchpoints, or catchpoints of the breakpoint -list specified as argument. If no argument is specified, delete all -breakpoints (@value{GDBN} asks confirmation, unless you have @code{set -confirm off}). You can abbreviate this command as @code{d}. +Delete the breakpoints, watchpoints, tracepoints, or catchpoints of the +breakpoint list specified as argument. If no argument is specified, delete +all breakpoints, watchpoints, tracepoints, and catchpoints (@value{GDBN} asks +confirmation, unless you have @code{set confirm off}). You can abbreviate this +command as @code{d}. @end table @node Disabling @@ -5665,10 +5667,10 @@ prefer to @dfn{disable} it. This makes the breakpoint inoperative as if it had been deleted, but remembers the information on the breakpoint so that you can @dfn{enable} it again later. -You disable and enable breakpoints, watchpoints, and catchpoints with -the @code{enable} and @code{disable} commands, optionally specifying -one or more breakpoint numbers as arguments. Use @code{info break} to -print a list of all breakpoints, watchpoints, and catchpoints if you +You disable and enable breakpoints, watchpoints, tracepoints, and catchpoints +with the @code{enable} and @code{disable} commands, optionally specifying +one or more breakpoint numbers as arguments. Use @code{info break} to print +a list of all breakpoints, watchpoints, tracepoints, and catchpoints if you do not know which numbers to use. Disabling and enabling a breakpoint that has multiple locations @@ -5696,7 +5698,7 @@ set with the @code{tbreak} command starts out in this state. @end itemize You can use the following commands to enable or disable breakpoints, -watchpoints, and catchpoints: +watchpoints, tracepoints, and catchpoints: @table @code @kindex disable @@ -5874,7 +5876,7 @@ is decremented each time. @xref{Convenience Vars, ,Convenience Variables}. @end table -Ignore counts apply to breakpoints, watchpoints, and catchpoints. +Ignore counts apply to breakpoints, watchpoints, tracepoints, and catchpoints. @node Break Commands @@ -32987,8 +32989,8 @@ list of thread groups to which this breakpoint applies number of times the breakpoint has been hit @end table -If there are no breakpoints or watchpoints, the @code{BreakpointTable} -@code{body} field is an empty list. +If there are no breakpoints, watchpoints, tracepoints, or catchpoints, +the @code{BreakpointTable} @code{body} field is an empty list. @subsubheading @value{GDBN} Command @@ -33980,7 +33982,7 @@ to execute until it reaches a debugger stop event. If the it reaches a stop event. Stop events may include @itemize @bullet @item -breakpoints or watchpoints +breakpoints, watchpoints, tracepoints, or catchpoints @item signals or exceptions @item |