From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24618 invoked by alias); 11 Dec 2006 02:35:49 -0000 Received: (qmail 24609 invoked by uid 22791); 11 Dec 2006 02:35:49 -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; Mon, 11 Dec 2006 02:35:44 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1Gtb0w-00034U-Fe; Sun, 10 Dec 2006 21:35:34 -0500 Date: Mon, 11 Dec 2006 02:35:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: MI: fix base members in references Message-ID: <20061211023534.GA11761@nevyn.them.org> Mail-Followup-To: Nick Roberts , Vladimir Prus , gdb-patches@sources.redhat.com References: <17787.10504.215397.177658@kahikatea.snap.net.nz> <200612100037.24768.ghost@cs.msu.su> <17787.11900.251681.440151@kahikatea.snap.net.nz> <200612100114.44118.ghost@cs.msu.su> <17787.35236.492750.204386@kahikatea.snap.net.nz> <20061210204207.GA1681@nevyn.them.org> <17788.30961.422979.535189@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17788.30961.422979.535189@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes 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: 2006-12/txt/msg00160.txt.bz2 On Mon, Dec 11, 2006 at 10:15:29AM +1300, Nick Roberts wrote: > Looking at code is a bit like peeling an onion: when you remove one layer > there's another layer beneath. Unfortunately I have to work within my > limitations, both temporal and mental, and I was just trying to get Vladimir to > do a sanity check. It's easier to show code doesn't work than prove it does > and I don't follow his point about using value_type (var->value) instead of > var->type. Surely if he thinks that there is a simpler/better patch then > the onus is on him to provide it? If you can't explain why your change is correct, then by default, it is not the correct fix. We can't just throw bandages at the codebase; that's how you get bigger onions, not better programs. > > get_type_deref looks at the type, and if it is a pointer or reference, > > it dereferences it. I assume that this is because we want to show the > > children of pointers to structs and references to structs. Is that > > right? > > My patch was just for references to pointers. Sorry, I don't know how else to explain what that function does; that's the important thing here. What does not happen that you want to make happen, and why doesn't it happen? The explanation in my previous message _should_ answer those questions, if I've understood the discussion right, but maybe it doesn't. -- Daniel Jacobowitz CodeSourcery