diff options
author | Keith Seitz <keiths@redhat.com> | 2012-07-30 17:45:37 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2012-07-30 17:45:37 +0000 |
commit | eff9c3e636220ad8610d42d696a36a3a3f68dbfb (patch) | |
tree | 6d94700755fab78635e6364def8d66618d780fab /gdb/linespec.c | |
parent | 728400d7698631b5f58f222c1506a2e30ca2aa2d (diff) | |
download | gdb-eff9c3e636220ad8610d42d696a36a3a3f68dbfb.zip gdb-eff9c3e636220ad8610d42d696a36a3a3f68dbfb.tar.gz gdb-eff9c3e636220ad8610d42d696a36a3a3f68dbfb.tar.bz2 |
* linespec.c (linespec_lex_number): A number followed
by quotes is a valid number, too.
* gdb.linespec/ls-errs.exp: Check some quote-enclosed
linespecs.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r-- | gdb/linespec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c index 3d7f62f..51994c8 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -391,10 +391,11 @@ linespec_lexer_lex_number (linespec_parser *parser, linespec_token *tokenp) } /* If the next character in the input buffer is not a space, comma, - or colon, this input does not represent a number. */ + quote, or colon, this input does not represent a number. */ if (*PARSER_STREAM (parser) != '\0' && !isspace (*PARSER_STREAM (parser)) && *PARSER_STREAM (parser) != ',' - && *PARSER_STREAM (parser) != ':') + && *PARSER_STREAM (parser) != ':' + && !strchr (linespec_quote_characters, *PARSER_STREAM (parser))) { PARSER_STREAM (parser) = LS_TOKEN_STOKEN (*tokenp).ptr; return 0; |