From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21020 invoked by alias); 6 Jun 2008 00:49:29 -0000 Received: (qmail 21011 invoked by uid 22791); 6 Jun 2008 00:49:28 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 06 Jun 2008 00:49:08 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m560n6qj027774 for ; Thu, 5 Jun 2008 20:49:06 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m560n5Fm008091; Thu, 5 Jun 2008 20:49:05 -0400 Received: from opsy.redhat.com (vpn-10-81.bos.redhat.com [10.16.10.81]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m560n5E5010316; Thu, 5 Jun 2008 20:49:05 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 9A553378187; Thu, 5 Jun 2008 18:49:04 -0600 (MDT) To: gdb-patches@sourceware.org Subject: Re: [RFA] Patch to limit field name completion candidates References: <20080605170952.GJ29085@caradoc.them.org> <20080605194553.GG25085@caradoc.them.org> <20080605200807.GJ25085@caradoc.them.org> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Fri, 06 Jun 2008 00:49:00 -0000 In-Reply-To: <20080605200807.GJ25085@caradoc.them.org> (Daniel Jacobowitz's message of "Thu\, 5 Jun 2008 16\:08\:07 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-06/txt/msg00087.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: >> In that case, nothing will call mark_struct_expression, and so the >> completion machinery will not attempt field name completion. Daniel> Right. But this would appear to be a bug from the user's point of Daniel> view. We'll just call it a hypothetical limitation of the Daniel> implementation :-) Ah, yeah, I see what you mean: there can definitely be losing cases. For instance if you try to complete "nonexistingThing->", you'll just get all the symbols again. I'm not sure what to do here... I guess we could try to get completion to print an error to the user. This could affect only the situation where we thought we could complete a field name based on the syntax, but then failed during "semantic analysis". (I don't know offhand if readline can do this for us or not.) Another thing not accounted for in this implementation is that for some languages you may want to complete more things. For instance, this would have to be expanded to work properly for Java, because in Java you can have a type name, a field name, or method name after ".". I think this isn't a big problem; the current code is, IMO, a decent step in that direction. Tom