This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Patch to limit field name completion candidates
- From: Eli Zaretskii <eliz at gnu dot org>
- To: tromey at redhat dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 13 May 2008 06:16:31 +0300
- Subject: Re: [RFA] Patch to limit field name completion candidates
- References: <m38wyf6py1.fsf@fleche.redhat.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Tom Tromey <tromey@redhat.com>
> Date: Mon, 12 May 2008 17:52:06 -0600
>
> For a long time now I've accidentally typed things like:
>
> p somestruct.<TAB>
>
> ... and had to wait while gdb dumped all available symbols to gud.
>
> It seemed to me that gdb should know that I'm trying to complete a
> field expression and limit the completions to fields actually
> occurring in the structure type on the left hand side.
Ooh, another completion junkie! Good, I'm also hooked.
> I only updated the C parser. This code works by modifying the lexer
> to return a special COMPLETE token in the important cases. Note that
> it completes both "p foo.TAB" and "p foo.somethingTAB" correctly --
> the former by making an expression to a field with an empty name.
Thanks. But what about the situation where I actually want to type
p foo.c:bar
If I type "p foo.<TAB>", will I see "foo.c" as one of the possible
completions, after your change, whether there is or isn't also a
struct foo in the program?