From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6495 invoked by alias); 6 Dec 2001 20:43:19 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6410 invoked from network); 6 Dec 2001 20:43:16 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 6 Dec 2001 20:43:16 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16C5My-0002zX-00; Thu, 06 Dec 2001 15:43:48 -0500 Date: Thu, 06 Dec 2001 12:43:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb@sources.redhat.com Subject: Re: Handling of structure dereferencing Message-ID: <20011206154348.D11234@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , gdb@sources.redhat.com References: <20011206120739.A1490@nevyn.them.org> <7263-Thu06Dec2001214750+0200-eliz@is.elta.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7263-Thu06Dec2001214750+0200-eliz@is.elta.co.il> User-Agent: Mutt/1.3.23i X-SW-Source: 2001-12/txt/msg00063.txt.bz2 On Thu, Dec 06, 2001 at 09:47:50PM +0200, Eli Zaretskii wrote: > > Date: Thu, 6 Dec 2001 12:07:39 -0500 > > From: Daniel Jacobowitz > > > > Right now, and historically, gdb has accepted things like: > > struct foo {char a} *b, **c, ***d; > > > > (gdb) print b.a > > (gdb) print d->a > > You mean, instead of b->a and (**d)->a, yes? Yes, exactly. > > So, straw poll: how would people feel about: > > - not letting this happen; only explicit dereferencing > > I don't mind in this specific case, but I wonder whether there isn't > some iceberg of which this is only a tip. We do want GDB to continue > to print a string when you say "p str", and str is a pointer to a > string, right? It's quite possible that the same machinery which > supports printing arrays also causes the above. I don't think that's the case; printing a char* does not involve implicit dereferencing (if it did, you'd only get the first character). -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer