From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6701 invoked by alias); 22 Apr 2002 11:16:16 -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 6694 invoked from network); 22 Apr 2002 11:16:13 -0000 Received: from unknown (HELO cerbere.u-strasbg.fr) (130.79.112.7) by sources.redhat.com with SMTP; 22 Apr 2002 11:16:13 -0000 Received: from laocoon (laocoon.u-strasbg.fr [130.79.112.72]) by cerbere.u-strasbg.fr (8.9.3/8.8.7) with ESMTP id NAA11091; Mon, 22 Apr 2002 13:16:03 +0200 Message-Id: <4.2.0.58.20020422125444.01c40a60@ics.u-strasbg.fr> X-Sender: muller@ics.u-strasbg.fr Date: Mon, 22 Apr 2002 04:16:00 -0000 To: Eli Zaretskii From: Pierre Muller Subject: Re: [RFC] Enhance completer for fields of structures. Cc: gdb-patches@sources.redhat.com In-Reply-To: References: <4.2.0.58.20020422110003.01c386f0@ics.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-SW-Source: 2002-04/txt/msg00787.txt.bz2 At 13:53 22/04/2002 , Eli Zaretskii a écrit: >On Mon, 22 Apr 2002, Pierre Muller wrote: > > > The patch attached below does allow me to get a > > correct completion of expressions like > > if X is a variable of type > > PRECORD, PRECORD being a pointer to type > > TRECORD = record > > x,y : longint; > > next : precord; > > end; > > > > (gdb) print X^.N > > if I press tab, I get X^.NEXT > > even if there are several global variables starting with letter N. > >Sounds good, but please make sure the change doesn't break any past >behavior. For example, did you test it with C++ foo:bar and foo::bar >class members? No, my C++ knowledge is much too small for this :( I wouldn't probably be able to find any troubles, what simple C++ sources could I use to test this out? What is the difference between one and two ':' in your above example? Anyhow, for the moment, only the pascal parser does return a non NULL value for parse_for_type function so ithe onyl point where a problem could arise is the supplementary call to make_symbol_completion_list at start of location_completer. Maybe it would be safer to call a special version (to be written) that would only return something if parser_for_type returns a non zero value. Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99