From c6ef451cd84c003d0d3b438bec2455c96d2db843 Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Fri, 1 Sep 2000 18:37:05 +0000 Subject: [PATCH] Fix core dump when executing ``b .'' command. --- gdb/ChangeLog | 6 ++++++ gdb/symtab.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6f0bc08067e..94eb3c628e3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2000-09-01 Kevin Buettner + + * symtab.c (decode_line_1): Make sure leading character is + actually a colon before skipping over leading colons in global + namespace specification. + 2000-09-01 Michael Snyder * regcache.c (reg_flush_command): New function. Maintainer-mode diff --git a/gdb/symtab.c b/gdb/symtab.c index f48368f2e23..2e83933b5be 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2642,7 +2642,8 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab, /* First check for "global" namespace specification, of the form "::foo". If found, skip over the colons and jump to normal symbol processing */ - if ((*argptr == p) || (p[-1] == ' ') || (p[-1] == '\t')) + if (p[0] == ':' + && ((*argptr == p) || (p[-1] == ' ') || (p[-1] == '\t'))) saved_arg2 += 2; /* We have what looks like a class or namespace -- 2.30.2