[PATCH RFA] symtab.c: Don't coredump on ``b .''
Michael Snyder
msnyder@redhat.com
Fri Sep 1 11:16:00 GMT 2000
Kevin Buettner wrote:
>
> The patch below fixes a gdb coredump when you enter the command
>
> b .
>
> Okay to commit?
I'll say yes, since JimB is probably occupied.
Michael
> * symtab.c (decode_line_1): Make sure leading character is
> actually a colon before skipping over leading colons in global
> namespace specification.
>
> Index: symtab.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/symtab.c,v
> retrieving revision 1.13
> diff -u -p -r1.13 symtab.c
> --- symtab.c 2000/08/25 20:51:19 1.13
> +++ symtab.c 2000/09/01 18:06:13
> @@ -2642,7 +2642,8 @@ decode_line_1 (char **argptr, int funfir
> /* 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
More information about the Gdb-patches
mailing list