From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8175 invoked by alias); 13 May 2008 03:17:07 -0000 Received: (qmail 8166 invoked by uid 22791); 13 May 2008 03:17:06 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 13 May 2008 03:16:42 +0000 Received: from HOME-C4E4A596F7 ([83.130.255.47]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K0S00CXGF3TT6D2@i_mtaout2.012.net.il> for gdb-patches@sources.redhat.com; Tue, 13 May 2008 06:31:11 +0300 (IDT) Date: Tue, 13 May 2008 18:11:00 -0000 From: Eli Zaretskii Subject: Re: [RFA] Patch to limit field name completion candidates In-reply-to: X-012-Sender: halo1@inter.net.il To: tromey@redhat.com Cc: gdb-patches@sources.redhat.com Reply-to: Eli Zaretskii Message-id: References: X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00393.txt.bz2 > From: Tom Tromey > Date: Mon, 12 May 2008 17:52:06 -0600 > > For a long time now I've accidentally typed things like: > > p somestruct. > > ... and had to wait while gdb dumped all available symbols to gud. > > It seemed to me that gdb should know that I'm trying to complete a > field expression and limit the completions to fields actually > occurring in the structure type on the left hand side. Ooh, another completion junkie! Good, I'm also hooked. > I only updated the C parser. This code works by modifying the lexer > to return a special COMPLETE token in the important cases. Note that > it completes both "p foo.TAB" and "p foo.somethingTAB" correctly -- > the former by making an expression to a field with an empty name. Thanks. But what about the situation where I actually want to type p foo.c:bar If I type "p foo.", will I see "foo.c" as one of the possible completions, after your change, whether there is or isn't also a struct foo in the program?