* linespec.c (decode_line_internal): Skip symtabs_from_filename
authorTom Tromey <tromey@redhat.com>
Fri, 10 Feb 2012 17:31:34 +0000 (17:31 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 10 Feb 2012 17:31:34 +0000 (17:31 +0000)
when we have a C++ qualified name.

gdb/ChangeLog
gdb/linespec.c

index 41c32b9671aec6be5785c6aa81f4c8a25b0046ed..8467263e1ad4e9803d90070199909e8ca18423aa 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-10  Tom Tromey  <tromey@redhat.com>
+
+       * linespec.c (decode_line_internal): Skip symtabs_from_filename
+       when we have a C++ qualified name.
+
 2012-02-10  Pedro Alves  <palves@redhat.com>
 
        * inferior.c (inferior_pid_to_str): New.
index 109c7d2157c2f139be56f53ecfee3489066b9d25..94e8ef687d2d928c55aa63d0723562270a2a1656 100644 (file)
@@ -912,9 +912,11 @@ decode_line_internal (struct linespec_state *self, char **argptr)
   /* First things first: if ARGPTR starts with a filename, get its
      symtab and strip the filename from ARGPTR.
      Avoid calling symtab_from_filename if we know can,
-     it can be expensive.  */
+     it can be expensive.  We know we can avoid the call if we see a
+     single word (e.g., "break NAME") or if we see a qualified C++
+     name ("break QUAL::NAME").  */
 
-  if (*p != '\0')
+  if (*p != '\0' && !(p[0] == ':' && p[1] == ':'))
     {
       TRY_CATCH (file_exception, RETURN_MASK_ERROR)
        {
This page took 0.030301 seconds and 4 git commands to generate.