From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1028 invoked by alias); 6 Dec 2001 19:48:58 -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 855 invoked from network); 6 Dec 2001 19:48:49 -0000 Received: from unknown (HELO frigg.inter.net.il) (192.114.186.16) by sources.redhat.com with SMTP; 6 Dec 2001 19:48:49 -0000 Received: from zaretsky ([192.116.55.139]) by frigg.inter.net.il (Mirapoint) with ESMTP id BCA53411; Thu, 6 Dec 2001 21:48:38 +0200 (IST) Date: Thu, 06 Dec 2001 11:48:00 -0000 From: "Eli Zaretskii" To: drow@mvista.com Message-Id: <7263-Thu06Dec2001214750+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: gdb@sources.redhat.com In-reply-to: <20011206120739.A1490@nevyn.them.org> (message from Daniel Jacobowitz on Thu, 6 Dec 2001 12:07:39 -0500) Subject: Re: Handling of structure dereferencing Reply-to: Eli Zaretskii References: <20011206120739.A1490@nevyn.them.org> X-SW-Source: 2001-12/txt/msg00058.txt.bz2 > 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? > 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.