This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 07/23/2012 07:26 AM, Tom Tromey wrote:
">" == Hui Zhu <teawater@gmail.com> writes:

This issue must build test code without dir, for example: "1.c".

Why is that? It seems to me that the problem is in the linespec lexer, and that "break 1.c:5" or whatever ought to work ok.

It should also be pretty trivial to add a test for this case, too:


--- a/gdb/testsuite/gdb.linespec/ls-errs.exp
+++ b/gdb/testsuite/gdb.linespec/ls-errs.exp
@@ -124,7 +124,8 @@ foreach x [list "this_file_doesn't_exist.c" \
               "'this 'file' has quotes.c'" \
               "\"this 'file' has quotes.c\"" \
               "\"spaces: and :colons.c\"" \
-              "'more: :spaces: :and  colons::.c'"] {
+              "'more: :spaces: :and  colons::.c'" \
+              "1.c"] {
     # Remove any quoting from FILENAME for the error message.
     add the_tests "$x:3" invalid_file [string trim $x \"']
 }


Keith



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]