This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Improve completion of locations
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Subject: Re: [RFA] Improve completion of locations
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: 05 May 2001 14:26:10 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <9743-Sat05May2001210007+0300-eliz@is.elta.co.il>
"Eli Zaretskii" <eliz@is.elta.co.il> writes:
> I'm seeking approval for the patches below, which improve GDB's
> completion of locations in commands like "break LOCATION". The two
> main improvements are:
>
> - GDB now considers file names as well as symbol names when you
> type, e.g., "break foo". If there's a symbol foo_bar and a file
> foo-bar.c, both will be shown in the list of possible completions.
> Only files recorded in the debug info are used for completing file
> names for these commands.
>
> - When the user types "break foo.c:bar TAB", only symbols defined in
> the source file foo.c whose names begin with "bar" will be
> considered for completion. This reduces the number of possible
> completions by a large factor in many typical situations (I'd even
> dare to say that it makes symbol completion a useful feature
> ;-).
Whoops, you can't do this the way you have it implemented (checking if
they have a colon)
You'll interfere with C++ completion, because scopes are delimited by
double colons as well.
If you disambiguate first by checking if the stuff before the colon is
a valid source filename, i have no problem with it.
You can't just check for double colon, either, since I may have typed
"foo:", wanting to complete foo::bar
--Dan