[PATCH Bug breakpoints/14381] Fix linespec to parse file name that begin with decimal numbers

Keith Seitz keiths@redhat.com
Wed Jul 25 21:21:00 GMT 2012


On 07/25/2012 05:56 AM, Hui Zhu wrote:

>>>> 2012-07-24  Hui Zhu  <hui_zhu@mentor.com>
>>>>       * linespec.c (linespec_lexer_lex_number): Update comments,
>>>>       change the return and add check to make sure the input is
>>>>       the decimal numbers.
>>>>       (linespec_lexer_lex_one): If linespec_lexer_lex_number return
>>>>       false, call linespec_lexer_lex_string.

This patch caused several regressions:

FAIL: gdb.base/dprintf.exp: dprintf 26,"arg=%d, g=%d\n", arg, g (got 
interactive prompt)
FAIL: gdb.base/dprintf.exp: 1st dprintf, gdb
FAIL: gdb.base/dprintf.exp: 2nd dprintf, gdb
FAIL: gdb.base/dprintf.exp: 1st dprintf, call
FAIL: gdb.base/dprintf.exp: 2nd dprintf, call
FAIL: gdb.base/dprintf.exp: 1st dprintf, fprintf
FAIL: gdb.base/dprintf.exp: 2nd dprintf, fprintf
FAIL: gdb.base/list.exp: list range; filename:line1,filename:line2
FAIL: gdb.base/list.exp: list range; line1,line2
FAIL: gdb.base/list.exp: list range; upper bound past EOF
FAIL: gdb.base/list.exp: list range; both bounds past EOF
FAIL: gdb.base/list.exp: list range, must be same files
FAIL: gdb.linespec/ls-errs.exp: break 3:
FAIL: gdb.linespec/ls-errs.exp: break +10:
FAIL: gdb.linespec/ls-errs.exp: break -10:
FAIL: gdb.linespec/ls-errs.exp: break 3:
FAIL: gdb.linespec/ls-errs.exp: break +10:
FAIL: gdb.linespec/ls-errs.exp: break -10:
FAIL: gdb.linespec/ls-errs.exp: break 3	:
FAIL: gdb.linespec/ls-errs.exp: break +10	:
FAIL: gdb.linespec/ls-errs.exp: break -10	:
FAIL: gdb.linespec/ls-errs.exp: break 3	:
FAIL: gdb.linespec/ls-errs.exp: break +10	:
FAIL: gdb.linespec/ls-errs.exp: break -10	:
ERROR: (DejaGnu) proc "all tests in this module will fail.\"" does not 
exist. (backtrace.exp)

This happens because numeric tokens may be terminated by a comma or 
colon (in addition to whitespace).

The attached patch fixes these regressions (and fixes a typo in the 
comment for linespec_lexer_lex_one).

Ok for HEAD and 7.5?

Keith

ChangeLog
2012-07-25  Keith Seitz  <keiths@redhat.com>

         * linespec.c (linespec_lexer_lex_number): The input
         is also a valid number if the next character is a comma
	or colon.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lex_number-comma.patch
Type: text/x-patch
Size: 1013 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120725/2d8b1a50/attachment.bin>


More information about the Gdb-patches mailing list