This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Patch: completion -vs- duplicates
- From: Tom Tromey <tromey at redhat dot com>
- To: Daniel Berlin <dan at dberlin dot org>
- Cc: Eli Zaretskii <eliz at is dot elta dot co dot il>, <gdb-patches at sources dot redhat dot com>
- Date: 05 Jan 2002 11:32:58 -0700
- Subject: Re: Patch: completion -vs- duplicates
- References: <Pine.LNX.4.33.0201051042460.7370-100000@dberlin.org>
- Reply-to: tromey at redhat dot com
>>>>> "Daniel" == Daniel Berlin <dan@dberlin.org> writes:
Eli> The rest--how to display the candidates, whether to filter out
Eli> duplicates, etc.--is up to the UI's completion machinery.
It always makes sense to filter duplicates when doing textual
completion. What value can there be in completing to the second of
two identical items?
Eli> Concepts aside, the change you suggest has also practical
Eli> disadvantages: filtering duplicates in GDB's completion function
Eli> would mean a performance hit in the CLI version, since readline
Eli> will try to filter again.
Daniel> Yes. I remember this was the huge lose that caused completion
Daniel> to take forever, which is why I removed the duplicate
Daniel> filtering.
I'm surprised it is that important.
I'll write an Insight patch instead.
Daniel> I'm surprised you insight guys didn't notice then, actually.
I probably did. The bug has been around for a long time. I submitted
an Insight PR way back, which yesterday Keith replied to with a note
saying that it was a gdb bug.
I still think having the `complete' command print duplicates is not
optimal. Suppose you're writing a GUI that wraps gdb. In this case
you're sending 100x more data over the connection than is necessary.
Pruning duplicates in the `complete' command is probably appropriate.
Tom