* linespec.c (symtab_from_filename): Check for the end of string.
authorAleksandar Ristovski <aristovski@qnx.com>
Fri, 26 Aug 2011 17:58:57 +0000 (17:58 +0000)
committerAleksandar Ristovski <aristovski@qnx.com>
Fri, 26 Aug 2011 17:58:57 +0000 (17:58 +0000)
gdb/ChangeLog
gdb/linespec.c

index 3a5b491..5179af7 100644 (file)
@@ -1,3 +1,7 @@
+2011-08-26  Aleksandar Ristovski <aristovski@qnx.com>
+
+       * linespec.c (symtab_from_filename): Check for the end of string.
+
 2011-08-26  Marc Khouzam  <marc.khouzam@ericsson.com>
 
        PR mi/11912
index b96c79f..37ec368 100644 (file)
@@ -1835,6 +1835,8 @@ symtab_from_filename (char **argptr, char *p, int is_quote_enclosed)
     }
 
   /* Discard the file name from the arg.  */
+  if (*p1 == '\0')
+    return file_symtab;
   p = p1 + 1;
   while (*p == ' ' || *p == '\t')
     p++;