mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 01:53:38 +08:00
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>
This commit is contained in:
parent
8b53ea2ace
commit
4a4fd10d17
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
@ -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."
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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)"
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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"
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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'\\."
|
||||
|
@ -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.
|
||||
|
@ -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\")" \
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 $" {
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user