2008-05-13 Paul Pluzhnikov * linespec.c (decode_line_1): Don't try to interpret single-quoted text as linespec. Index: linespec.c =================================================================== RCS file: /cvs/src/src/gdb/linespec.c,v retrieving revision 1.77 diff -u -p -u -6 -r1.77 linespec.c --- linespec.c 3 May 2008 00:37:34 -0000 1.77 +++ linespec.c 14 May 2008 00:47:41 -0000 @@ -721,22 +721,31 @@ decode_line_1 (char **argptr, int funfir checking, where we allow things like: (gdb) break c::f(int) */ set_flags (*argptr, &is_quoted, &paren_pointer); - /* Check to see if it's a multipart linespec (with colons or - periods). */ + if ((*argptr)[0] == '\'') + { + /* Don't try to interpret anything in single quotes. */ + p = ""; + is_quote_enclosed = 0; + } + else + { + /* Check to see if it's a multipart linespec (with colons or + periods). */ - /* Locate the end of the first half of the linespec. - After the call, for instance, if the argptr string is "foo.c:123" - p will point at "123". If there is only one part, like "foo", p - will point to "". If this is a C++ name, like "A::B::foo", p will - point to "::B::foo". Argptr is not changed by this call. */ + /* Locate the end of the first half of the linespec. + After the call, for instance, if the argptr string is "foo.c:123" + p will point at "123". If there is only one part, like "foo", p + will point to "". If this is a C++ name, like "A::B::foo", p will + point to "::B::foo". Argptr is not changed by this call. */ - p = locate_first_half (argptr, &is_quote_enclosed); + p = locate_first_half (argptr, &is_quote_enclosed); + } /* Check if this is an Objective-C method (anything that starts with a '+' or '-' and a '['). */ if (is_objc_method_format (p)) { is_objc_method = 1;