From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31917 invoked by alias); 11 Feb 2006 18:35:08 -0000 Received: (qmail 31907 invoked by uid 22791); 11 Feb 2006 18:35:06 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sat, 11 Feb 2006 18:35:05 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F7zaG-0006bY-E6; Sat, 11 Feb 2006 13:35:00 -0500 Date: Sat, 11 Feb 2006 18:35:00 -0000 From: Daniel Jacobowitz To: Fred Fish Cc: Jim Blandy , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix ptype problem printing typedefs defined differently in different compilation units Message-ID: <20060211183500.GA25132@nevyn.them.org> Mail-Followup-To: Fred Fish , Jim Blandy , gdb-patches@sourceware.org References: <200601031517.50309.fnf@specifix.com> <200601231435.47790.fnf@specifix.com> <8f2776cb0601231245y6bc1e8a4yc80070284575e654@mail.gmail.com> <200602101935.06700.fnf@specifix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200602101935.06700.fnf@specifix.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00263.txt.bz2 On Fri, Feb 10, 2006 at 07:35:06PM -0500, Fred Fish wrote: > On Monday 23 January 2006 15:45, Jim Blandy wrote: > > On 1/23/06, Fred Fish wrote: > > > This is why I think the correct and complete solution is to allow the > > > user to directly specify the context. > > > > Sure. That would entail extending the 'type_exp' non-terminal to have > > a FILENAME COLONCOLON TYPE production. Sounds like the right thing. > > The below patch seems to fix ptype and whatis to allow the > 'file'::typename syntax, without breaking anything else and also > simplifying ptype_command. > > Comments? Don't you get a warning compiling this? It looks to me like, with objectprint set, ptype and whatis will now blow up; they call value_rtti_target_type without initializing val. Also ptype will now do the RTTI lookup; I'm not sure whether it should or not. The documentation for whatis and ptype leaves me way unenlightened about what the difference between them is supposed to be; perhaps we should eliminate the difference. -- Daniel Jacobowitz CodeSourcery