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/testsuite/gdb.base/help.exp | |
parent | 8b53ea2ace9d1fe7a04b3009bf75f5296e0428dc (diff) | |
download | fsf-binutils-gdb-4a4fd10d1707424b9b13aa4af0cec7590c086ea0.zip fsf-binutils-gdb-4a4fd10d1707424b9b13aa4af0cec7590c086ea0.tar.gz fsf-binutils-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/testsuite/gdb.base/help.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/help.exp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp index daa8c4a..5ea5c79 100644 --- a/gdb/testsuite/gdb.base/help.exp +++ b/gdb/testsuite/gdb.base/help.exp @@ -89,7 +89,8 @@ set expected_help_delete { "Delete all or some breakpoints\.\[\r\n\]+" "Usage: delete \\\[BREAKPOINTNUM\\\]...\[\r\n\]+" "Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+" - "To delete all breakpoints, give no argument\.\[\r\n\]+" + "To delete all breakpoints, watchpoints, tracepoints, and catchpoints,\.\[\r\n\]+" + "give no argument\.\[\r\n\]+" "Also a prefix command for deletion of other GDB objects\.\[\r\n\]+" } test_prefix_command_help {"d" "delete"} $expected_help_delete "help delete \"d\" abbreviation" |