Fix core dump when executing ``b .'' command.

This commit is contained in:
Kevin Buettner 2000-09-01 18:37:05 +00:00
parent 705152c5cd
commit c6ef451cd8
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2000-09-01 Kevin Buettner <kevinb@redhat.com>
* 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 <msnyder@cleaver.cygnus.com>
* regcache.c (reg_flush_command): New function. Maintainer-mode

View file

@ -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