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 | |
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>
45 files changed, 132 insertions, 122 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 5f05657..102bd7f 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -7080,10 +7080,11 @@ breakpoint_1 (const char *bp_num_list, bool show_internal, if (!filter) { if (bp_num_list == NULL || *bp_num_list == '\0') - uiout->message ("No breakpoints or watchpoints.\n"); + uiout->message ("No breakpoints, watchpoints, tracepoints, " + "or catchpoints.\n"); else - uiout->message ("No breakpoint or watchpoint matching '%s'.\n", - bp_num_list); + uiout->message ("No breakpoint, watchpoint, tracepoint, " + "or catchpoint matching '%s'.\n", bp_num_list); } } else @@ -12699,9 +12700,9 @@ delete_command (const char *arg, int from_tty) { int breaks_to_delete = 0; - /* Delete all breakpoints if no argument. Do not delete - internal breakpoints, these have to be deleted with an - explicit breakpoint number argument. */ + /* Delete all breakpoints, watchpoints, tracepoints, and catchpoints + if no argument. Do not delete internal breakpoints, these have to + be deleted with an explicit breakpoint number argument. */ for (breakpoint &b : all_breakpoints ()) if (user_breakpoint_p (&b)) { @@ -12711,7 +12712,9 @@ delete_command (const char *arg, int from_tty) /* Ask user only if there are some breakpoints to delete. */ if (!from_tty - || (breaks_to_delete && query (_("Delete all breakpoints? ")))) + || (breaks_to_delete + && query (_("Delete all breakpoints, watchpoints, tracepoints, " + "and catchpoints? ")))) for (breakpoint &b : all_breakpoints_safe ()) if (user_breakpoint_p (&b)) delete_breakpoint (&b); @@ -14236,7 +14239,7 @@ delete_trace_command (const char *arg, int from_tty) { int breaks_to_delete = 0; - /* Delete all breakpoints if no argument. + /* Delete all tracepoints if no argument. Do not delete internal or call-dummy breakpoints, these have to be deleted with an explicit breakpoint number argument. */ @@ -14830,7 +14833,8 @@ This command may be abbreviated \"disable\"."), Delete all or some breakpoints.\n\ Usage: delete [BREAKPOINTNUM]...\n\ Arguments are breakpoint numbers with spaces in between.\n\ -To delete all breakpoints, give no argument.\n\ +To delete all breakpoints, watchpoints, tracepoints, and catchpoints,\n\ +give no argument.\n\ \n\ Also a prefix command for deletion of other GDB objects."), &deletelist, 1, &cmdlist); @@ -14841,7 +14845,8 @@ Also a prefix command for deletion of other GDB objects."), Delete all or some breakpoints or auto-display expressions.\n\ Usage: delete breakpoints [BREAKPOINTNUM]...\n\ Arguments are breakpoint numbers with spaces in between.\n\ -To delete all breakpoints, give no argument.\n\ +To delete all breakpoints, watchpoints, tracepoints, and catchpoints,\n\ +give no argument.\n\ This command may be abbreviated \"delete\"."), &deletelist); 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 diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 0adaa6d..028422b 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -2358,8 +2358,8 @@ ppc_linux_nat_target::can_use_watchpoint_cond_accel (void) auto process_it = m_process_info.find (inferior_ptid.pid ()); - /* No breakpoints or watchpoints have been requested for this process, - we have at least one free DVC register. */ + /* No breakpoints, watchpoints, tracepoints, or catchpoints have been + requested for this process, we have at least one free DVC register. */ if (process_it == m_process_info.end ()) return true; diff --git a/gdb/testsuite/gdb.arch/i386-dr3-watch.exp b/gdb/testsuite/gdb.arch/i386-dr3-watch.exp index e2c89b8..84b3806 100644 --- a/gdb/testsuite/gdb.arch/i386-dr3-watch.exp +++ b/gdb/testsuite/gdb.arch/i386-dr3-watch.exp @@ -76,7 +76,7 @@ gdb_test_multiple "watch gap1" "$test" { gdb_test "delete" \ "" \ "delete all watchpoints" \ - {Delete all breakpoints\? \(y or n\) $} \ + {Delete all breakpoints, watchpoints, tracepoints, and catchpoints\? \(y or n\) $} \ "y" # If debug registers were left occupied by mistake, we'll fail to set diff --git a/gdb/testsuite/gdb.base/annota-input-while-running.exp b/gdb/testsuite/gdb.base/annota-input-while-running.exp index 1d1f523..4625622 100644 --- a/gdb/testsuite/gdb.base/annota-input-while-running.exp +++ b/gdb/testsuite/gdb.base/annota-input-while-running.exp @@ -57,7 +57,7 @@ gdb_annota_test "set annotate 2" ".*" "annotation set at level 2" set test "delete breakpoints" gdb_test_multiple "delete" $test { - -re "Delete all breakpoints. .y or n." { + -re "Delete all breakpoints, watchpoints, tracepoints, and catchpoints. .y or n." { send_gdb "y\n" exp_continue } diff --git a/gdb/testsuite/gdb.base/break-unload-file.exp b/gdb/testsuite/gdb.base/break-unload-file.exp index 2641fec..2d62cc5 100644 --- a/gdb/testsuite/gdb.base/break-unload-file.exp +++ b/gdb/testsuite/gdb.base/break-unload-file.exp @@ -121,8 +121,8 @@ proc test_break { initial_load always_inserted break_command } { # re-insert, GDB would fill the shadow buffer with a # breakpoint instruction). Avoid delete_breakpoints as that # doesn't record a pass/fail. - gdb_test "delete" "" "delete all breakpoints" \ - "Delete all breakpoints.*y or n.*$" "y" + gdb_test "delete" "" "delete all breakpoints, watchpoints, tracepoints, and catchpoints" \ + "Delete all breakpoints, watchpoints, tracepoints, and catchpoints.*y or n.*$" "y" # Re-add symbols back. set test "file \$binfile" diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index eda486a..cdb4c22 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -49,17 +49,17 @@ proc_with_prefix test_break {} { # for general use elsewhere. send_gdb "delete breakpoints\n" gdb_expect { - -re "Delete all breakpoints.*$" { + -re "Delete all breakpoints, watchpoints, tracepoints, and catchpoints.*$" { send_gdb "y\n" gdb_expect { -re "$::gdb_prompt $" { - fail "delete all breakpoints when none (unexpected prompt)" + fail "delete all breakpoints, watchpoints, tracepoints, and catchpoints when none (unexpected prompt)" } - timeout { fail "delete all breakpoints when none (timeout after unexpected prompt)" } + timeout { fail "delete all breakpoints, watchpoints, tracepoints, and catchpoints when none (timeout after unexpected prompt)" } } } - -re ".*$::gdb_prompt $" { pass "delete all breakpoints when none" } - timeout { fail "delete all breakpoints when none (timeout)" } + -re ".*$::gdb_prompt $" { pass "delete all breakpoints, watchpoints, tracepoints, and catchpoints when none" } + timeout { fail "delete all breakpoints, watchpoints, tracepoints, and catchpoints when none (timeout)" } } # test break at function diff --git a/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp b/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp index 48fc75c..b0a5196 100644 --- a/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp +++ b/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp @@ -234,7 +234,7 @@ proc test_single_step { always_inserted auto_hw } { } gdb_test "maint info breakpoints 0" \ - "No breakpoint or watchpoint matching '0'\." \ + "No breakpoint, watchpoint, tracepoint, or catchpoint matching '0'\." \ "single-step breakpoint is not left behind" # Confirm the thread really advanced. diff --git a/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp b/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp index 4aefc44..d586135 100644 --- a/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp +++ b/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp @@ -27,7 +27,7 @@ # # Command aborted. # delete breakpoints -# Delete all breakpoints? (y or n) y +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints? (y or n) y # (gdb) b function # Breakpoint 3 at 0x40048b: file test.c, line 33. # continue diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp index 98dad7c..291722e 100644 --- a/gdb/testsuite/gdb.base/default.exp +++ b/gdb/testsuite/gdb.base/default.exp @@ -265,7 +265,7 @@ gdb_test "info args" "No frame selected." #test info bogus-gdb-command gdb_test "info bogus-gdb-command" "Undefined info command: \"bogus-gdb-command\". Try \"help info\".*" #test info breakpoints -gdb_test "info breakpoints" "No breakpoints or watchpoints." +gdb_test "info breakpoints" "No breakpoints, watchpoints, tracepoints, or catchpoints." #test info copying # The license text is very big, so it may overwhelm Expect's output buffer # and cause the test to fail occasionally. To avoid this problem, verify diff --git a/gdb/testsuite/gdb.base/del.exp b/gdb/testsuite/gdb.base/del.exp index 2a715e8..58937de 100644 --- a/gdb/testsuite/gdb.base/del.exp +++ b/gdb/testsuite/gdb.base/del.exp @@ -35,7 +35,7 @@ proc test_delete_alias { alias } { "remove all breakpoints" gdb_test "info break" \ - "No breakpoints or watchpoints." \ + "No breakpoints, watchpoints, tracepoints, or catchpoints." \ "info break after clearing breakpoints" @@ -50,7 +50,7 @@ proc test_delete_alias { alias } { "Remove last breakpoint" gdb_test "info break" \ - "No breakpoints or watchpoints." \ + "No breakpoints, watchpoints, tracepoints, or catchpoints." \ "info break after removing break on main" } diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp index e7259f6..924133e 100644 --- a/gdb/testsuite/gdb.base/ena-dis-br.exp +++ b/gdb/testsuite/gdb.base/ena-dis-br.exp @@ -140,7 +140,7 @@ gdb_test "continue" \ "continue to auto-deleted break marker3" gdb_test "info break $bp" \ - ".*No breakpoint or watchpoint matching.*" \ + ".*No breakpoint, watchpoint, tracepoint, or catchpoint matching.*" \ "info auto-deleted break marker3" # Verify that we can set a breakpoint and manually disable it (we've diff --git a/gdb/testsuite/gdb.base/foll-fork.exp b/gdb/testsuite/gdb.base/foll-fork.exp index abbbeec..ecf2111 100644 --- a/gdb/testsuite/gdb.base/foll-fork.exp +++ b/gdb/testsuite/gdb.base/foll-fork.exp @@ -289,7 +289,7 @@ proc_with_prefix catch_fork_child_follow {second_inferior} { gdb_test "delete breakpoints" \ "" \ "set follow-fork child, cleanup" \ - "Delete all breakpoints. \\(y or n\\) $" \ + "Delete all breakpoints, watchpoints, tracepoints, and catchpoints. \\(y or n\\) $" \ "y" } @@ -316,7 +316,7 @@ proc_with_prefix catch_fork_unpatch_child {} { "Catchpoint \[0-9\]* \\(forked process \[0-9\]*\\),.*" \ "unpatch child, catch fork" - # Delete all breakpoints and catchpoints. + # Delete all breakpoints, watchpoints, tracepoints, and catchpoints. delete_breakpoints # Force $srcfile as the current GDB source can be in glibc sourcetree. @@ -393,7 +393,7 @@ proc_with_prefix tcatch_fork_parent_follow {} { gdb_test "delete breakpoints" \ "" \ "set follow-fork parent, cleanup" \ - "Delete all breakpoints. \\(y or n\\) $" \ + "Delete all breakpoints, watchpoints, tracepoints, and catchpoints. \\(y or n\\) $" \ "y" } diff --git a/gdb/testsuite/gdb.base/hbreak-unmapped.exp b/gdb/testsuite/gdb.base/hbreak-unmapped.exp index fd88f37..ccb4b20 100644 --- a/gdb/testsuite/gdb.base/hbreak-unmapped.exp +++ b/gdb/testsuite/gdb.base/hbreak-unmapped.exp @@ -71,5 +71,5 @@ gdb_test "info break" "hw breakpoint.*y.*0x0\+\[ \t\]\+" \ gdb_test_no_output "delete \$bpnum" "" "delete" \ "delete hw breakpoint" -gdb_test "info break" "No breakpoints or watchpoints\." \ - "info break shows no breakpoints" +gdb_test "info break" "No breakpoints, watchpoints, tracepoints, or catchpoints\." \ + "info break shows no breakpoints, watchpoints, tracepoints, or catchpoints" diff --git a/gdb/testsuite/gdb.base/hbreak2.exp b/gdb/testsuite/gdb.base/hbreak2.exp index 211baa2..8f5735b 100644 --- a/gdb/testsuite/gdb.base/hbreak2.exp +++ b/gdb/testsuite/gdb.base/hbreak2.exp @@ -228,7 +228,7 @@ gdb_test "continue" \ "continue to hardware breakpoint at }" # -# Delete all breakpoints so we can start over, course this can be a test too. +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so we can start over, course this can be a test too. # delete_breakpoints 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" diff --git a/gdb/testsuite/gdb.base/new-ui.exp b/gdb/testsuite/gdb.base/new-ui.exp index a58d62f..9716692 100644 --- a/gdb/testsuite/gdb.base/new-ui.exp +++ b/gdb/testsuite/gdb.base/new-ui.exp @@ -130,17 +130,17 @@ proc_with_prefix do_test {} { # Verify that we get proper queries on the main UI, but that they are # auto-answered on secondary UIs. with_spawn_id $gdb_main_spawn_id { - gdb_test "delete" "" "delete all breakpoint on main console" \ - "Delete all breakpoints. .y or n. $" "n" + gdb_test "delete" "" "delete all breakpoints, watchpoints, tracepoints, and catchpoints on main console" \ + "Delete all breakpoints, watchpoints, tracepoints, and catchpoints. .y or n. $" "n" } with_spawn_id $extra_spawn_id { # Check output in two stages in order to override # gdb_test_multiple's internal "got interactive prompt" fail # that would otherwise match if the expect buffer happens to # fill with partial output that ends in "(y or n) ". - set test "delete all breakpoints on extra console" + set test "delete all breakpoints, watchpoints, tracepoints, and catchpoints on extra console" gdb_test_multiple "delete" $test { - -re "Delete all breakpoints. .y or n. " { + -re "Delete all breakpoints, watchpoints, tracepoints, and catchpoints. .y or n. " { gdb_test "" \ ".answered Y; input not from terminal." \ $test diff --git a/gdb/testsuite/gdb.base/save-bp.exp b/gdb/testsuite/gdb.base/save-bp.exp index ee87010..2872d7b 100644 --- a/gdb/testsuite/gdb.base/save-bp.exp +++ b/gdb/testsuite/gdb.base/save-bp.exp @@ -22,8 +22,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } { if ![runto_main] { return -1 } -# Delete all breakpoints so that the "runto_main" breakpoint above -# does not interfere with our testing. +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that +# the "runto_main" breakpoint above does not interfere with our testing. delete_breakpoints # Insert a bunch of breakpoints... The goal is to create breakpoints @@ -64,8 +64,8 @@ clean_restart $testfile if ![runto_main] { return -1 } -# Delete all breakpoints so that the "runto_main" breakpoint above -# does not interfere with our testing. +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that +# the "runto_main" breakpoint above does not interfere with our testing. delete_breakpoints # ... and restore the breakpoints. diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index 4182eb2..ee9bea2 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -219,7 +219,7 @@ gdb_test "step" \ "step onto breakpoint" # -# delete all breakpoints so we can start over, course this can be a test too +# delete all breakpoints, watchpoints, tracepoints, and catchpoints so we can start over, course this can be a test too # delete_breakpoints diff --git a/gdb/testsuite/gdb.base/server-del-break.exp b/gdb/testsuite/gdb.base/server-del-break.exp index e18bb7d..db59878 100644 --- a/gdb/testsuite/gdb.base/server-del-break.exp +++ b/gdb/testsuite/gdb.base/server-del-break.exp @@ -29,10 +29,10 @@ gdb_test "break -q main" \ # Try deleting all breakpoints, using the "server" command prefix. # Prefixing the "delete breakpoints" with "server" should turn -# the confirmation request ("Delete all breakpoints? (y or n)") +# the confirmation request ("Delete all breakpoints, watchpoints, tracepoints, and catchpoints? (y or n)") # off, hence we expect the operation to be executed without output. gdb_test_no_output "server delete breakpoints" # Double-check that the all breakpoints were in fact deleted. gdb_test "info break" \ - "No breakpoints or watchpoints." + "No breakpoints, watchpoints, tracepoints, or catchpoints." diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp index 3cd43bf..1b1c26b 100644 --- a/gdb/testsuite/gdb.cp/annota2.exp +++ b/gdb/testsuite/gdb.cp/annota2.exp @@ -158,11 +158,11 @@ gdb_test_multiple "continue" "continue until exit" { } # -# delete all breakpoints +# delete all breakpoints, watchpoints, tracepoints, and catchpoints # send_gdb "delete\n" gdb_expect { - -re ".*Delete all breakpoints. \\(y or n\\) \r\n\032\032query.*$" { + -re ".*Delete all breakpoints, watchpoints, tracepoints, and catchpoints. \\(y or n\\) \r\n\032\032query.*$" { send_gdb "y\n" gdb_expect { -re "\r\n\032\032post-query\r\n${breakpoints_invalid}$gdb_prompt$" { pass "delete bps" } diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp index 978f3d5..e5da031 100644 --- a/gdb/testsuite/gdb.cp/annota3.exp +++ b/gdb/testsuite/gdb.cp/annota3.exp @@ -114,11 +114,11 @@ lappend el "\r\n\032\032stopped\r\n" gdb_expect_list "continue to exit" "$gdb_prompt$" $el # -# delete all breakpoints +# delete all breakpoints, watchpoints, tracepoints, and catchpoints # send_gdb "delete\n" gdb_expect { - -re ".*Delete all breakpoints. \\(y or n\\) \r\n\032\032query.*$" { + -re ".*Delete all breakpoints, watchpoints, tracepoints, and catchpoints. \\(y or n\\) \r\n\032\032query.*$" { send_gdb "y\n" gdb_expect { -re "\r\n\032\032post-query\r\n$gdb_prompt$" { pass "delete bps" } diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp index 01e7724..882a83b 100644 --- a/gdb/testsuite/gdb.cp/ovldbreak.exp +++ b/gdb/testsuite/gdb.cp/ovldbreak.exp @@ -309,23 +309,23 @@ with_test_prefix "multiple breakpoints" { send_gdb "delete breakpoints\n" gdb_expect { - -re "Delete all breakpoints.* $" { + -re "Delete all breakpoints, watchpoints, tracepoints, and catchpoints.* $" { send_gdb "y\n" gdb_expect { -re ".*$gdb_prompt $" { - pass "delete all breakpoints" + pass "delete all breakpoints, watchpoints, tracepoints, and catchpoints" } timeout { - fail "delete all breakpoints (timeout)" + fail "delete all breakpoints, watchpoints, tracepoints, and catchpoints (timeout)" } } } timeout { - fail "delete all breakpoints (timeout)" + fail "delete all breakpoints, watchpoints, tracepoints, and catchpoints (timeout)" } } -gdb_test "info breakpoints" "No breakpoints or watchpoints." "breakpoint info (after delete)" +gdb_test "info breakpoints" "No breakpoints, watchpoints, tracepoints, or catchpoints." "breakpoint info (after delete)" diff --git a/gdb/testsuite/gdb.cp/save-bp-qualified.exp b/gdb/testsuite/gdb.cp/save-bp-qualified.exp index 8eb5c98..3f6ee0f 100644 --- a/gdb/testsuite/gdb.cp/save-bp-qualified.exp +++ b/gdb/testsuite/gdb.cp/save-bp-qualified.exp @@ -29,8 +29,8 @@ proc restart {} { if ![runto_main] { return 0 } - # Delete all breakpoints so that the "runto_main" breakpoint above - # does not interfere with our testing. + # Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that + # the "runto_main" breakpoint above does not interfere with our testing. delete_breakpoints return 1 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp index 7eaa37e..5268e78 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp @@ -160,8 +160,8 @@ proc do_test { start_label func_name tag } { return -1 } - # Delete all breakpoints so that the output of "info breakpoints" - # below will only contain a single breakpoint. + # Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that + # the output of "info breakpoints" below will only contain a single breakpoint. delete_breakpoints # Place a breakpoint within the function in the header file. diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp index 8b59beb..d3a1fd3 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp @@ -148,8 +148,8 @@ if ![runto_main] { return -1 } -# Delete all breakpoints so that the output of "info breakpoints" -# below will only contain a single breakpoint. +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that +# the output of "info breakpoints" below will only contain a single breakpoint. delete_breakpoints # Place a breakpoint within the function in the header file. @@ -162,8 +162,8 @@ gdb_test "info breakpoints" \ ".* in callee at \[^\r\n\]+${srcfile4}:22\\y.*" \ "check for breakpoint at ${srcfile4}" -# Delete all breakpoints so that the output of "info breakpoints" -# below will only contain a single breakpoint. +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that +# the output of "info breakpoints" below will only contain a single breakpoint. delete_breakpoints # Place a breakpoint within the function in the header file. diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp index 9a0dac7..66d9f64 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp @@ -137,8 +137,8 @@ if ![runto_main] { return -1 } -# Delete all breakpoints so that the output of "info breakpoints" -# below will only contain a single breakpoint. +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that +# the output of "info breakpoints" below will only contain a single breakpoint. delete_breakpoints # Place a breakpoint within the function in the header file. diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp index 907d538..1ba346b 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp @@ -122,8 +122,8 @@ if ![runto_main] { return -1 } -# Delete all breakpoints so that the output of "info breakpoints" -# below will only contain a single breakpoint. +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that +# the output of "info breakpoints" below will only contain a single breakpoint. delete_breakpoints # Place a breakpoint within the function in the header file. diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb.guile/scm-breakpoint.exp index 2e38e26..73e2413 100644 --- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp +++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp @@ -224,7 +224,7 @@ proc_with_prefix test_bkpt_invisible { } { gdb_test "guile (print (breakpoint-visible? ibp))" \ "= #f" "check breakpoint invisibility" gdb_test "info breakpoints" \ - "No breakpoints or watchpoints.*" \ + "No breakpoints, watchpoints, tracepoints, or catchpoints.*" \ "check info breakpoints does not show invisible breakpoints" gdb_test "maint info breakpoints" \ "scm-breakpoint\.c:$ibp_location.*" \ @@ -287,7 +287,7 @@ proc_with_prefix test_bkpt_internal { } { gdb_scm_test_silent_cmd "guile (register-breakpoint! wp1)" \ "register wp1" gdb_test "info breakpoints" \ - "No breakpoints or watchpoints.*" \ + "No breakpoints, watchpoints, tracepoints, or catchpoints.*" \ "check info breakpoints does not show invisible watchpoint" gdb_test "maint info breakpoints" \ ".*watchpoint.*result.*" \ @@ -511,7 +511,7 @@ proc_with_prefix test_bkpt_temporary { } { ".*$srcfile:$ibp_location.*" gdb_test "guile (print (breakpoint-temporary? ibp))" "Invalid object: <gdb:breakpoint>.*" \ "check temporary breakpoint is deleted after being hit" - gdb_test "info breakpoints" "No breakpoints or watchpoints.*" \ + gdb_test "info breakpoints" "No breakpoints, watchpoints, tracepoints, or catchpoints.*" \ "check info breakpoints shows temporary breakpoint is deleted" } diff --git a/gdb/testsuite/gdb.linespec/cpexplicit.exp b/gdb/testsuite/gdb.linespec/cpexplicit.exp index 4e7b462..5c93c34 100644 --- a/gdb/testsuite/gdb.linespec/cpexplicit.exp +++ b/gdb/testsuite/gdb.linespec/cpexplicit.exp @@ -31,8 +31,8 @@ namespace eval $testfile { # at LOCATION. proc test_breakpoint {linespec location} { - # Delete all breakpoints, set a new breakpoint at LINESPEC, - # and attempt to run to it. + # Delete all breakpoints, watchpoints, tracepoints, and catchpoints, + # set a new breakpoint at LINESPEC, and attempt to run to it. delete_breakpoints gdb_breakpoint $linespec gdb_continue_to_breakpoint $linespec $location diff --git a/gdb/testsuite/gdb.linespec/explicit.exp b/gdb/testsuite/gdb.linespec/explicit.exp index 6e80931..625f9ce 100644 --- a/gdb/testsuite/gdb.linespec/explicit.exp +++ b/gdb/testsuite/gdb.linespec/explicit.exp @@ -33,8 +33,8 @@ namespace eval $testfile { proc test_breakpoint {linespec location} { set testname "set breakpoint at \"$linespec\"" - # Delete all breakpoints, set a new breakpoint at LINESPEC, - # and attempt to run to it. + # Delete all breakpoints, watchpoints, tracepoints, and catchpoints, + # set a new breakpoint at LINESPEC, and attempt to run to it. delete_breakpoints if {[gdb_breakpoint $linespec]} { pass $testname diff --git a/gdb/testsuite/gdb.mi/mi-py-modify-bp.exp b/gdb/testsuite/gdb.mi/mi-py-modify-bp.exp index 54f63d6..79fcf9f 100644 --- a/gdb/testsuite/gdb.mi/mi-py-modify-bp.exp +++ b/gdb/testsuite/gdb.mi/mi-py-modify-bp.exp @@ -34,7 +34,7 @@ set remote_python_file [gdb_remote_download host \ mi_clean_restart $binfile mi_runto_main -# Delete all breakpoints. +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints. mi_delete_breakpoints # Create a breakpoint. At this point the breakpoint is global, but diff --git a/gdb/testsuite/gdb.mi/mi-return.exp b/gdb/testsuite/gdb.mi/mi-return.exp index ce4e971..dafa150 100644 --- a/gdb/testsuite/gdb.mi/mi-return.exp +++ b/gdb/testsuite/gdb.mi/mi-return.exp @@ -50,7 +50,7 @@ mi_runto callee4 mi_gdb_test "205-break-delete" \ "205\\^done.*" \ - "delete all breakpoints" + "delete all breakpoints, watchpoints, tracepoints, and catchpoints" test_return_simple diff --git a/gdb/testsuite/gdb.mi/mi-thread-specific-bp.exp b/gdb/testsuite/gdb.mi/mi-thread-specific-bp.exp index 8245f06..715e0f7 100644 --- a/gdb/testsuite/gdb.mi/mi-thread-specific-bp.exp +++ b/gdb/testsuite/gdb.mi/mi-thread-specific-bp.exp @@ -56,7 +56,7 @@ foreach_mi_ui_mode mode { # trigger an assertion. if {$mode eq "separate"} { with_spawn_id $gdb_main_spawn_id { - gdb_test "info breakpoints" "No breakpoints or watchpoints\\." \ + gdb_test "info breakpoints" "No breakpoints, watchpoints, tracepoints, or catchpoints\\." \ "check CLI 'info breakpoints' when there are no breakpoints" } } diff --git a/gdb/testsuite/gdb.multi/inferior-specific-bp.exp b/gdb/testsuite/gdb.multi/inferior-specific-bp.exp index 8432610..5cc451b 100644 --- a/gdb/testsuite/gdb.multi/inferior-specific-bp.exp +++ b/gdb/testsuite/gdb.multi/inferior-specific-bp.exp @@ -176,4 +176,4 @@ gdb_test "remove-inferiors 1" \ # Now check 'info breakpoints' to ensure the breakpoint is gone. gdb_test "info breakpoints $bp_number" \ - "No breakpoint or watchpoint matching '$bp_number'\\." + "No breakpoint, watchpoint, tracepoint, or catchpoint matching '$bp_number'\\." diff --git a/gdb/testsuite/gdb.opt/inline-small-func.exp b/gdb/testsuite/gdb.opt/inline-small-func.exp index c71dfb9..9090e23 100644 --- a/gdb/testsuite/gdb.opt/inline-small-func.exp +++ b/gdb/testsuite/gdb.opt/inline-small-func.exp @@ -45,8 +45,8 @@ if ![runto_main] { return -1 } -# Delete all breakpoints so that the output of "info breakpoints" -# below will only contain a single breakpoint. +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that +# the output of "info breakpoints" below will only contain a single breakpoint. delete_breakpoints # Place a breakpoint within the function in the header file. diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp index 67da48d..ef4c929 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-breakpoint.exp @@ -333,7 +333,7 @@ proc_with_prefix test_bkpt_invisible { } { "py-breakpoint\.c:$ibp_location*" "Check breakpoint location 2" gdb_test "python print (ilist\[0\].visible)" \ "False" "Check breakpoint visibility 2" - gdb_test "info breakpoints" "No breakpoints or watchpoints.*" \ + gdb_test "info breakpoints" "No breakpoints, watchpoints, tracepoints, or catchpoints.*" \ "Check info breakpoints does not show invisible breakpoints" gdb_test "maint info breakpoints" \ "py-breakpoint\.c:$ibp_location.*" \ @@ -428,7 +428,7 @@ proc_with_prefix test_bkpt_internal { } { gdb_py_test_silent_cmd "python wp1 = gdb.Breakpoint (\"result\", type=gdb.BP_WATCHPOINT, wp_class=gdb.WP_WRITE, internal=True )" \ "Set watchpoint" 0 gdb_test "info breakpoints" \ - "No breakpoints or watchpoints.*" \ + "No breakpoints, watchpoints, tracepoints, or catchpoints.*" \ "Check info breakpoints does not show invisible breakpoints" gdb_test "maint info breakpoints" \ ".*watchpoint.*result.*" \ @@ -591,7 +591,7 @@ proc_with_prefix test_bkpt_temporary { } { "Check temporary stop callback executed before deletion." gdb_test "python print (ibp.temporary)" "RuntimeError: Breakpoint 2 is invalid.*" \ "Check temporary breakpoint is deleted after being hit" - gdb_test "info breakpoints" "No breakpoints or watchpoints.*" \ + gdb_test "info breakpoints" "No breakpoints, watchpoints, tracepoints, or catchpoints.*" \ "Check info breakpoints shows temporary breakpoint is deleted" } @@ -600,7 +600,7 @@ proc_with_prefix test_bkpt_temporary { } { proc_with_prefix test_bkpt_address {} { global gdb_prompt decimal srcfile - # Delete all breakpoints + # Delete all breakpoints, watchpoints, tracepoints, and catchpoints delete_breakpoints gdb_test "python gdb.Breakpoint(\"*main\")" \ diff --git a/gdb/testsuite/gdb.reverse/ppc_record_test_isa_3_1.exp b/gdb/testsuite/gdb.reverse/ppc_record_test_isa_3_1.exp index 0306a9d..06257f9 100644 --- a/gdb/testsuite/gdb.reverse/ppc_record_test_isa_3_1.exp +++ b/gdb/testsuite/gdb.reverse/ppc_record_test_isa_3_1.exp @@ -105,7 +105,7 @@ gdb_test_no_output "set exec-direction forward" "start forward test3" gdb_test "record stop" ".*Process record is stopped.*" "stopped recording 2" set test_del_bkpts "delete breakpoints, answer prompt 2" -# Delete all breakpoints and catchpoints. +# Delete all breakpoints, watchpoints, tracepoints, and catchpoints. delete_breakpoints gdb_test_no_output "record" "start recording test2" diff --git a/gdb/testsuite/gdb.threads/continue-pending-after-query.exp b/gdb/testsuite/gdb.threads/continue-pending-after-query.exp index 41487c9..7f2a60a 100644 --- a/gdb/testsuite/gdb.threads/continue-pending-after-query.exp +++ b/gdb/testsuite/gdb.threads/continue-pending-after-query.exp @@ -67,7 +67,7 @@ proc test {} { set test "delete breakpoints, answer prompt" set saw_prompt 0 gdb_test_multiple "delete breakpoints" $test { - -re "Delete all breakpoints.*y or n.*$" { + -re "Delete all breakpoints, watchpoints, tracepoints, and catchpoints.*y or n.*$" { set saw_prompt 1 send_gdb "y\n" exp_continue diff --git a/gdb/testsuite/gdb.threads/continue-pending-status.exp b/gdb/testsuite/gdb.threads/continue-pending-status.exp index f998625..32da7ec 100644 --- a/gdb/testsuite/gdb.threads/continue-pending-status.exp +++ b/gdb/testsuite/gdb.threads/continue-pending-status.exp @@ -89,9 +89,9 @@ for {set i 0} {$i < $attempts} {incr i} { "Switching to thread $thread .*" \ "switch to non-event thread" - # Delete all breakpoints so that continuing doesn't switch - # back to the event thread to do a step-over, which would mask - # away the original bug, which depended on the event thread + # Delete all breakpoints, watchpoints, tracepoints, and catchpoints + # so that continuing doesn't switch back to the event thread to do a step-over, + # which would mask away the original bug, which depended on the event thread # still having TARGET_STOPPED_BY_SW_BREAKPOINT stop_reason. delete_breakpoints diff --git a/gdb/testsuite/gdb.threads/thread_check.exp b/gdb/testsuite/gdb.threads/thread_check.exp index ba80a89..83fa86d 100644 --- a/gdb/testsuite/gdb.threads/thread_check.exp +++ b/gdb/testsuite/gdb.threads/thread_check.exp @@ -28,7 +28,7 @@ # - create 2 breakpoints #1 main() #2 tf() (the thread function) # - run gdb till #1 main() breakpoint is reached # - continue to breakpoint #2 tf() -# - delete all breakpoints +# - delete all breakpoints, watchpoints, tracepoints, and catchpoints # - exit gdb. @@ -71,7 +71,7 @@ gdb_test "backtrace" \ # -# delete all breakpoints +# delete all breakpoints, watchpoints, tracepoints, and catchpoints # delete_breakpoints diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 9a906f0..7357d56 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -373,10 +373,10 @@ proc delete_breakpoints {} { # set timeout 100 - set msg "delete all breakpoints in delete_breakpoints" + set msg "delete all breakpoints, watchpoints, tracepoints, and catchpoints in delete_breakpoints" set deleted 0 gdb_test_multiple "delete breakpoints" "$msg" { - -re "Delete all breakpoints.*y or n.*$" { + -re "Delete all breakpoints, watchpoints, tracepoints, and catchpoints.*y or n.*$" { send_gdb "y\n" answer exp_continue } @@ -390,7 +390,7 @@ proc delete_breakpoints {} { set deleted 0 set msg "info breakpoints" gdb_test_multiple $msg $msg { - -re "No breakpoints or watchpoints..*$gdb_prompt $" { + -re "No breakpoints, watchpoints, tracepoints, or catchpoints..*$gdb_prompt $" { set deleted 1 } -re "$gdb_prompt $" { diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 001e4ee..b3a27ef 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -355,25 +355,25 @@ proc mi_delete_breakpoints {} { # FIXME: The mi operation won't accept a prompt back and will use the 'all' arg send_gdb "102-break-delete\n" gdb_expect 30 { - -re "Delete all breakpoints.*y or n.*$" { + -re "Delete all breakpoints, watchpoints, tracepoints, and catchpoints.*y or n.*$" { send_gdb "y\n" exp_continue } -re "102-break-delete\r\n102\\\^done\r\n$mi_gdb_prompt$" { # This happens if there were no breakpoints } - timeout { perror "Delete all breakpoints in mi_delete_breakpoints (timeout)" ; return } + timeout { perror "Delete all breakpoints, watchpoints, tracepoints, and catchpoints in mi_delete_breakpoints (timeout)" ; return } } -# The correct output is not "No breakpoints or watchpoints." but an +# The correct output is not "No breakpoints, watchpoints, tracepoints, or catchpoints." but an # empty BreakpointTable. Also, a query is not acceptable with mi. send_gdb "103-break-list\n" gdb_expect 30 { -re "103-break-list\r\n103\\\^done,BreakpointTable=\{\}\r\n$mi_gdb_prompt$" {} -re "103-break-list\r\n103\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[\\\]\}\r\n$mi_gdb_prompt$" {} - -re "103-break-list\r\n103\\\^doneNo breakpoints or watchpoints.\r\n\r\n$mi_gdb_prompt$" {warning "Unexpected console text received"} + -re "103-break-list\r\n103\\\^doneNo breakpoints, watchpoints, tracepoints, or catchpoints.\r\n\r\n$mi_gdb_prompt$" {warning "Unexpected console text received"} -re "$mi_gdb_prompt$" { perror "Breakpoints not deleted" ; return } - -re "Delete all breakpoints.*or n.*$" { + -re "Delete all breakpoints, watchpoints, tracepoints, and catchpoints.*or n.*$" { warning "Unexpected prompt for breakpoints deletion" send_gdb "y\n" exp_continue diff --git a/gdbserver/mem-break.cc b/gdbserver/mem-break.cc index e2cb13f..c23bb46 100644 --- a/gdbserver/mem-break.cc +++ b/gdbserver/mem-break.cc @@ -1999,7 +1999,8 @@ check_mem_write (CORE_ADDR mem_addr, unsigned char *buf, delete_disabled_breakpoints (); } -/* Delete all breakpoints, and un-insert them from the inferior. */ +/* Delete all breakpoints, watchpoints, tracepoints, and catchpoints, + and un-insert them from the inferior. */ void delete_all_breakpoints (void) @@ -2021,8 +2022,8 @@ mark_breakpoints_out (struct process_info *proc) raw_bp->inserted = 0; } -/* Release all breakpoints, but do not try to un-insert them from the - inferior. */ +/* Release all breakpoints, watchpoints, tracepoints, and catchpoints, + but do not try to un-insert them from the inferior. */ void free_all_breakpoints (struct process_info *proc) diff --git a/gdbserver/mem-break.h b/gdbserver/mem-break.h index 99689c9..3652118 100644 --- a/gdbserver/mem-break.h +++ b/gdbserver/mem-break.h @@ -216,7 +216,8 @@ void check_mem_read (CORE_ADDR mem_addr, unsigned char *buf, int mem_len); void check_mem_write (CORE_ADDR mem_addr, unsigned char *buf, const unsigned char *myaddr, int mem_len); -/* Delete all breakpoints. */ +/* Delete all breakpoints, watchpoints, tracepoints, and catchpoints, + and un-insert them from the inferior. */ void delete_all_breakpoints (void); @@ -224,8 +225,8 @@ void delete_all_breakpoints (void); void mark_breakpoints_out (struct process_info *proc); -/* Delete all breakpoints, but do not try to un-insert them from the - inferior. */ +/* Delete all breakpoints, watchpoints, tracepoints, and catchpoints, + but do not try to un-insert them from the inferior. */ void free_all_breakpoints (struct process_info *proc); |