diff options
author | Pedro Alves <palves@redhat.com> | 2017-11-07 11:00:31 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-11-07 11:06:00 +0000 |
commit | cc638e867c240546b4dbc791761099d3ca5fe4a9 (patch) | |
tree | 05e697f06e2a29b97f864ecffd6e67cafa09e0e6 /gdb/testsuite/gdb.base/ena-dis-br.exp | |
parent | d0fe47010fc3289e081ba547a0bfcc6d07906cd2 (diff) | |
download | gdb-cc638e867c240546b4dbc791761099d3ca5fe4a9.zip gdb-cc638e867c240546b4dbc791761099d3ca5fe4a9.tar.gz gdb-cc638e867c240546b4dbc791761099d3ca5fe4a9.tar.bz2 |
Breakpoint location parsing: always error instead of warning
It's odd that when parsing a breakpoint or location number, we error out
in most cases, but warn in others.
(gdb) disable 1-
bad breakpoint number at or near: '1-'
(gdb) disable -1
bad breakpoint number at or near: '-1'
(gdb) disable .foo
bad breakpoint number at or near: '.foo'
(gdb) disable foo.1
Bad breakpoint number 'foo.1'
(gdb) disable 1.foo
warning: bad breakpoint number at or near '1.foo'
This changes GDB to always error out. It required touching one testcase
that expected the warning.
gdb/ChangeLog:
2017-11-07 Pedro Alves <palves@redhat.com>
* breakpoint.c (extract_bp_number_and_location): Change return
type to void. Throw error instead of warning.
(enable_disable_command): Adjust.
gdb/testsuite/ChangeLog:
2017-11-07 Pedro Alves <palves@redhat.com>
* gdb.base/ena-dis-br.exp: Don't expect "warning:".
Diffstat (limited to 'gdb/testsuite/gdb.base/ena-dis-br.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/ena-dis-br.exp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp index 9b8d251..2bbb734 100644 --- a/gdb/testsuite/gdb.base/ena-dis-br.exp +++ b/gdb/testsuite/gdb.base/ena-dis-br.exp @@ -395,10 +395,10 @@ proc test_ena_dis_br { what } { } } - # Now enable(disable) $b4.1 fooobaar and - # it should give warning on fooobaar. + # Now enable(disable) '$b4.1 fooobaar'. This should error on + # fooobaar. gdb_test "$what $b4.1 fooobaar" \ - "warning: bad breakpoint number at or near 'fooobaar'" \ + "bad breakpoint number at or near 'fooobaar'" \ "$what \$b4.1 fooobar" set test1 "${what}d \$b4.1" |