From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18133 invoked by alias); 5 Jan 2002 18:37:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18047 invoked from network); 5 Jan 2002 18:37:09 -0000 Received: from unknown (HELO dberlin.org) (64.246.6.106) by sources.redhat.com with SMTP; 5 Jan 2002 18:37:09 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by dberlin.org (8.11.6/8.11.6) with ESMTP id g05Ib7108173; Sat, 5 Jan 2002 13:37:07 -0500 Date: Sat, 05 Jan 2002 10:37:00 -0000 From: Daniel Berlin To: Daniel Jacobowitz cc: Subject: Re: Patch: completion -vs- duplicates In-Reply-To: <20020105133046.A22271@nevyn.them.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-01/txt/msg00075.txt.bz2 On Sat, 5 Jan 2002, Daniel Jacobowitz wrote: > On Sat, Jan 05, 2002 at 10:43:57AM -0500, Daniel Berlin wrote: > > On Sat, 5 Jan 2002, Eli Zaretskii wrote: > > > > > > From: Tom Tromey > > > > 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 > > Is it possible to turn this off in readline? I'd rather do it once > than in every frontend! And from what I recall, readline is not > terribly efficient about it. Nor were we. IIRC, we did it as each thing was added to the list (I could be wrong here), which gives you horrible complexity. If this is the case, doing it once at the end would be fine by me. > >