From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22129 invoked by alias); 4 Apr 2006 16:13:19 -0000 Received: (qmail 22119 invoked by uid 22791); 4 Apr 2006 16:13:19 -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; Tue, 04 Apr 2006 16:13:17 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FQo9a-000159-78; Tue, 04 Apr 2006 12:13:14 -0400 Date: Tue, 04 Apr 2006 16:13:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: Add -var-info-path-expression command Message-ID: <20060404161314.GA4016@nevyn.them.org> Mail-Followup-To: Vladimir Prus , gdb-patches@sources.redhat.com References: <20060404132621.GA380@nevyn.them.org> <200604041744.37005.ghost@cs.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200604041744.37005.ghost@cs.msu.su> 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-04/txt/msg00031.txt.bz2 On Tue, Apr 04, 2006 at 05:44:36PM +0400, Vladimir Prus wrote: > On Tuesday 04 April 2006 17:26, Daniel Jacobowitz wrote: > > On Tue, Apr 04, 2006 at 11:22:02AM +0400, Vladimir Prus wrote: > > > Any comments on this yet? I believe we've discussed the rationale for > > > -var-info-path-expression command in the main list, and agreed that it's > > > necessary. > > > > Yes, I think we've agreed on that. > > > > It would be nice if there were test cases and documentation to go with > > this. > > Is this a hard requirement? To merge the patch? Yes, I think so. It also has a lot of formatting issues, at least one APPLE LOCAL marker, and bunch of untranslated error messages (which might be inappropriate uses of error; some of them maybe should be internal errors instead; I didn't check yet). > > I've been putting off looking at this patch, because (A) I had a whole > > lot of other patches to review, and (B) it's huge and gnarly. I am not > > really sure that Apple took the right approach with C++ classes and > > run-time type information. Maybe they did, but it's not at all > > obvious. > > FWIW, I'm not 100% understand what they did, but this does not matter. My > patch does some surgery to grab only -var-info-path-expression, and no > type/RTTI related changes. + /* This is the most specific type of a C++ class object - as obtained from + value_rtti_type. It will be set in two cases: + + a) If the varobj is a pointer or reference to a C++ object. In this + case the dynamic_type will be a pointer or reference to the full + class. + b) If the varobj is a C++ object. In this case, it will be the type + of the full object, and the value field will be adjusted by + value_full_object to the full object. */ + struct type *dynamic_type; + And the related code below. I'm not saying it's right or wrong, by the way. I'm saying it's complicated and I need to spend a while thinking about it. -- Daniel Jacobowitz CodeSourcery