]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog
"enable count" user input error handling (PR gdb/15678)
authorSimon Marchi <simon.marchi@ericsson.com>
Mon, 2 Feb 2015 19:57:31 +0000 (14:57 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Fri, 6 Feb 2015 15:27:01 +0000 (10:27 -0500)
commitb9d6130764916fac3d9bcfde2d672053a0ef3316
treed276c6a8a853b80b72bdd856847d5e6a47e8febf
parent55325047241cf38dae3c6a577561c740a9024bf3
"enable count" user input error handling (PR gdb/15678)

Typing "enable count" by itself crashes GDB. Also, if you omit the
breakpoint number/range, the error message is not very clear:

(gdb) enable count 2
warning: bad breakpoint number at or near ''
(gdb) enable count
Segmentation fault (core dumped)

With this patch, the error messages are slightly more helpful:

(gdb) enable count 2
Argument required (one or more breakpoint numbers).
(gdb) enable count
Argument required (hit count).

gdb/ChangeLog:

PR gdb/15678
* breakpoint.c (map_breakpoint_numbers): Check for empty args
string.
(enable_count_command): Check args for NULL value.

gdb/testsuite/ChangeLog:

PR gdb/15678
* gdb.base/ena-dis-br.exp: Test "enable count" for bad user input.
gdb/ChangeLog
gdb/breakpoint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/ena-dis-br.exp