This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: completion -vs- duplicates


On Sat, 5 Jan 2002, Eli Zaretskii wrote:

> > From: Tom Tromey <tromey@redhat.com>
> > Date: 04 Jan 2002 17:07:51 -0700
> > 
> > Right now the `complete' command can print duplicates.  readline seems
> > to filter these, so you don't see this using Tab in the CLI, but you
> > can see it in Insight or by using the complete command.
> 
> Hm... shouldn't Insight do the same as readline?
> 
> In my mind, GDB doesn't do any completion at all.  Completion is a
> feature of the UI; GDB just helps the UI by providing a function to
> call to get all the completion candidates.  The rest--how to display
> the candidates, whether to filter out duplicates, etc.--is up to the
> UI's completion machinery.  So conceptually, in my mind, the
> filtering doesn't belong in GDB.
> 
> Concepts aside, the change you suggest has also practical
> disadvantages: filtering duplicates in GDB's completion function would
> mean a performance hit in the CLI version, since readline will try to
> filter again.

Yes. I remember this was the huge lose that caused completion to take 
forever, which is why I removed the duplicate filtering.
I'm surprised you insight guys didn't notice then, actually.
--Dan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]