From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19464 invoked by alias); 23 Jan 2006 19:35:51 -0000 Received: (qmail 19455 invoked by uid 22791); 23 Jan 2006 19:35:50 -0000 X-Spam-Check-By: sourceware.org Received: from w099.z064220152.sjc-ca.dsl.cnc.net (HELO duck.specifix.com) (64.220.152.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 23 Jan 2006 19:35:47 +0000 Received: from diveadx (duck.specifix.com [64.220.152.99]) by duck.specifix.com (Postfix) with ESMTP id 074D1FC4E; Mon, 23 Jan 2006 11:35:46 -0800 (PST) From: Fred Fish Reply-To: fnf@specifix.com To: Jim Blandy Subject: Re: [PATCH] Fix ptype problem printing typedefs defined differently in different compilation units Date: Mon, 23 Jan 2006 19:35:00 -0000 User-Agent: KMail/1.9.1 Cc: Daniel Jacobowitz , gdb-patches@sourceware.org References: <200601031517.50309.fnf@specifix.com> <200601231143.22560.fnf@specifix.com> <8f2776cb0601231117r6bdb8f95g6ee4c60aa6ebd22@mail.gmail.com> In-Reply-To: <8f2776cb0601231117r6bdb8f95g6ee4c60aa6ebd22@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601231435.47790.fnf@specifix.com> 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-01/txt/msg00336.txt.bz2 On Monday 23 January 2006 14:17, Jim Blandy wrote: > Are you sure you're not misunderstanding your typescript? When you > have a core file, you have a frame, so it's always using the frame > context. I think that's the correct behavior. Agreed. The problem isn't that it shouldn't be using the frame context, the issues are (1) it behaves differently when using and not using a core file (2) there is no way to print the type in other contexts. I.E. if you are poking around in the sources with the print command and want to print a type using the source context, you can't easily do that. This is why I think the correct and complete solution is to allow the user to directly specify the context. > When there is a frame, > the source position (as established by 'list' commands) generally > doesn't override the frame position when deciding scopes. It's the > same for (say) printing static variables. Yup, which is why you can print static variables using the 'file'::var syntax. > So I don't think there's a problem with your patch. I guess we could still use that patch to fall back to using the source context when there is no overriding frame context, while working on allowing the user to directly specify the source context. -Fred