This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: search_symbols(in symtab.c) -- fix off by one error
- To: Elena Zannoni <ezannoni at cygnus dot com>
- Subject: Re: [RFA]: search_symbols(in symtab.c) -- fix off by one error
- From: David Taylor <taylor at cygnus dot com>
- Date: Fri, 25 Aug 2000 14:33:24 -0400
- cc: gdb-patches at sourceware dot cygnus dot com
From: Elena Zannoni <ezannoni@cygnus.com>
Date: Fri, 25 Aug 2000 11:56:20 -0400 (EDT)
Yes, true. Approved. Now, though, there is another similar thing in
symtab.c:symtab_symbol_info(). This function also defines an array and
uses LABEL_NAMESPACE to access its elements. But it subtracts 1, so
this is in sync:
Thanks.
symtab_symbol_info (regexp, kind, from_tty)
char *regexp;
namespace_enum kind;
int from_tty;
{
static char *classnames[]
=
{"variable", "function", "type", "method"};
[....]
printf_filtered (regexp
? "All %ss matching regular expression \"%s\":\n"
: "All defined %ss:\n",
classnames[(int) (kind - LABEL_NAMESPACE - 1)], regexp);
[....]
I wonder why LABEL_NAMESPACE was used at all.
Can you fix this above occurrence as well, so it is all consistent?
Done. I'll be committing it later today.
Thanks
Elena
David