diff options
author | Pedro Alves <palves@redhat.com> | 2011-05-24 15:03:30 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-05-24 15:03:30 +0000 |
commit | cdac0397bf4a5390c5fd087edb0bb07ce4b423ef (patch) | |
tree | ffcb4d4159432533cd5cd54df1d3bd3a5aa43d88 /gdb/testsuite | |
parent | 91d4fe3f8562ad0295751602f600a345a0631f7c (diff) | |
download | gdb-cdac0397bf4a5390c5fd087edb0bb07ce4b423ef.zip gdb-cdac0397bf4a5390c5fd087edb0bb07ce4b423ef.tar.gz gdb-cdac0397bf4a5390c5fd087edb0bb07ce4b423ef.tar.bz2 |
2011-05-24 Pedro Alves <pedro@codesourcery.com>
gdb/
* breakpoint.c (watchpoint_check): If the watchpoint went out of
scope, clear its command list.
(map_breakpoint_numbers): Don't walk the related breakpoints list
of each breakpoint.
gdb/testsuite/
* gdb.base/commands.exp (watchpoint_command_test): Check that the
watchpoint's command list didn't execute when the watchpoint went
out of scope.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/commands.exp | 18 |
2 files changed, 21 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index fad1f65..0c2a6aa 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-05-24 Pedro Alves <pedro@codesourcery.com> + + * gdb.base/commands.exp (watchpoint_command_test): Check that the + watchpoint's command list didn't execute when the watchpoint went + out of scope. + 2011-05-24 Pierre Muller <muller@ics.u-strasbg.fr> Centralize -DSYMBOL_PREFIX=\"_\" additional flags in gdb.exp. @@ -30,7 +36,6 @@ Cope with async mode. - gdb/testsuite/ * gdb.mi/mi-break.exp (test_breakpoint_commands): Split gdb_test into gdb_test + mi_expect_stop. diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index a0ac25b..fb9cf4e 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -294,6 +294,9 @@ proc watchpoint_command_test {} { pass "begin commands on watch" } } + # See the 'No symbol "value...' fail below. This command will + # fail if it's executed in the wrong frame. If adjusting the + # test, make sure this property holds. gdb_test_multiple "print value" "add print command to watch" { -re ">$" { pass "add print command to watch" @@ -308,9 +311,18 @@ proc watchpoint_command_test {} { "" \ "end commands on watch" - gdb_test "continue" \ - "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*run.c:(57|82).*" \ - "continue with watch" + set test "continue with watch" + gdb_test_multiple "continue" "$test" { + -re "No symbol \"value\" in current context.\r\n$gdb_prompt $" { + # Happens if GDB actually runs the watchpoints commands, + # even though the watchpoint was deleted for not being in + # scope. + fail $test + } + -re "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*run.c:(57|82).*$gdb_prompt $" { + pass $test + } + } } proc test_command_prompt_position {} { |