diff options
author | Pedro Alves <palves@redhat.com> | 2013-01-22 20:22:39 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-01-22 20:22:39 +0000 |
commit | 0928e93dfdc0fac8849999962e2ef69cf638fd9a (patch) | |
tree | ecfc8aecd2e924e36d43ac4d63822b1184ae5b31 /gdb | |
parent | 9c97429fb1870f53e69556e967d01ce01116b35e (diff) | |
download | gdb-0928e93dfdc0fac8849999962e2ef69cf638fd9a.zip gdb-0928e93dfdc0fac8849999962e2ef69cf638fd9a.tar.gz gdb-0928e93dfdc0fac8849999962e2ef69cf638fd9a.tar.bz2 |
If a breakpoint is not user visible, then there's no point in
bothering the frontend about it... This is the exact same check MI
does.
I also smoke tested Emacs 23 in gud-gdb mode, both annotations=2
and annotations=3. I didn't notice anything break.
gdb/
2013-01-22 Pedro Alves <palves@redhat.com>
* annotate.c (breakpoint_changed): Skip if breakpoint is not
user-visible.
gdb/testsuite/
2013-01-22 Pedro Alves <palves@redhat.com>
* gdb.base/annota1.exp (signal sent): No longer expect
breakpoints-invalid.
* gdb.cp/annota2.exp (continue until exit)
(watch triggered on a.x): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/annotate.c | 3 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/annota1.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/annota2.exp | 6 |
5 files changed, 19 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index adc2217..94325d4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-01-22 Pedro Alves <palves@redhat.com> + * annotate.c (breakpoint_changed): Skip if breakpoint is not + user-visible. + +2013-01-22 Pedro Alves <palves@redhat.com> + * annotate.c (annotate_breakpoints_changed): Rename to ... (annotate_breakpoints_invalid): ... this. Make static. (breakpoint_changed): Adjust. diff --git a/gdb/annotate.c b/gdb/annotate.c index d82daa2..ccba5fe 100644 --- a/gdb/annotate.c +++ b/gdb/annotate.c @@ -575,6 +575,9 @@ annotate_display_prompt (void) static void breakpoint_changed (struct breakpoint *b) { + if (b->number <= 0) + return; + annotate_breakpoints_invalid (); } diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index dd92509..53f734f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2013-01-22 Pedro Alves <palves@redhat.com> + * gdb.base/annota1.exp (signal sent): No longer expect + breakpoints-invalid. + * gdb.cp/annota2.exp (continue until exit) + (watch triggered on a.x): Ditto. + +2013-01-22 Pedro Alves <palves@redhat.com> + * gdb.base/annota1.exp (breakpoints_invalid): New variable. Adjust tests to breakpoints-invalid changes. * gdb.cp/annota2.exp (breakpoints_invalid, frames_invalid): New diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp index 45638ba..2015154 100644 --- a/gdb/testsuite/gdb.base/annota1.exp +++ b/gdb/testsuite/gdb.base/annota1.exp @@ -425,7 +425,7 @@ if [target_info exists gdb,nosignals] { } else { setup_xfail hppa*-*-hpux11* gdb_test_multiple "signal SIGTRAP" "signal sent" { - -re ".*\032\032post-prompt\r\nContinuing with signal SIGTRAP.\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n\r\n\032\032signalled\r\n\r\nProgram terminated with signal \r\n\032\032signal-name\r\nSIGTRAP\r\n\032\032signal-name-end\r\n, \r\n\032\032signal-string\r\nTrace.breakpoint trap\r\n\032\032signal-string-end\r\n.\r\nThe program no longer exists.\r\n${breakpoints_invalid}\r\n\032\032stopped\r\n$gdb_prompt$" { + -re ".*\032\032post-prompt\r\nContinuing with signal SIGTRAP.\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n\r\n\032\032signalled\r\n\r\nProgram terminated with signal \r\n\032\032signal-name\r\nSIGTRAP\r\n\032\032signal-name-end\r\n, \r\n\032\032signal-string\r\nTrace.breakpoint trap\r\n\032\032signal-string-end\r\n.\r\nThe program no longer exists.\r\n\r\n\032\032stopped\r\n$gdb_prompt$" { pass "signal sent" } } diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp index a4f7b17..d0a457a 100644 --- a/gdb/testsuite/gdb.cp/annota2.exp +++ b/gdb/testsuite/gdb.cp/annota2.exp @@ -102,7 +102,7 @@ gdb_test_multiple "print a" "print class" { # `a.x is 1' is asynchronous regarding to `frames-invalid'. # gdb_test_multiple "continue" "continue until exit" { - -re "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)*\r\na.x is 1\r\n\(\r\n\032\032frames-invalid\r\n\)*\r\n\032\032exited 0\r\n$inferior_exited_re normally.\r\n${breakpoints_invalid}\r\n\032\032stopped\r\n$gdb_prompt$" { + -re "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)*\r\na.x is 1\r\n\(\r\n\032\032frames-invalid\r\n\)*\r\n\032\032exited 0\r\n$inferior_exited_re normally.\r\n\r\n\032\032stopped\r\n$gdb_prompt$" { pass "continue until exit" } } @@ -162,10 +162,10 @@ gdb_test_multiple "watch a.x" "set watch on a.x" { # annotate-watchpoint # gdb_test_multiple "next" "watch triggered on a.x" { - -re "\r\n\032\032post-prompt\r\n\032\032starting\r\n${frames_invalid}${breakpoints_invalid}\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n${breakpoints_invalid}.*$gdb_prompt$" { + -re "\r\n\032\032post-prompt\r\n\032\032starting\r\n${frames_invalid}${breakpoints_invalid}\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" { pass "watch triggered on a.x" } - -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n${frames_invalid}\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n${breakpoints_invalid}$gdb_prompt$" { + -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n${frames_invalid}\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" { kfail "gdb/38" "watch triggered on a.x" } } |