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


>>>>> "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


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