aboutsummaryrefslogtreecommitdiff
path: root/gdb/linespec.c
diff options
context:
space:
mode:
authorAleksandar Ristovski <aristovski@qnx.com>2011-08-26 17:58:57 +0000
committerAleksandar Ristovski <aristovski@qnx.com>2011-08-26 17:58:57 +0000
commitedb2aadf8b9b8b968917fad4727f039f0e10f7fb (patch)
treece0a0bf3eee43e20c0283e5c76ecd5a2a9a118e9 /gdb/linespec.c
parent7cf80422688b442803f70265465668fae16e2f38 (diff)
downloadgdb-edb2aadf8b9b8b968917fad4727f039f0e10f7fb.zip
gdb-edb2aadf8b9b8b968917fad4727f039f0e10f7fb.tar.gz
gdb-edb2aadf8b9b8b968917fad4727f039f0e10f7fb.tar.bz2
* linespec.c (symtab_from_filename): Check for the end of string.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r--gdb/linespec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c
index b96c79f..37ec368 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -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++;