From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25310 invoked by alias); 6 Dec 2001 17:07:30 -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 25237 invoked from network); 6 Dec 2001 17:07:01 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 6 Dec 2001 17:07:01 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16C1zn-0000Qv-00 for ; Thu, 06 Dec 2001 12:07:39 -0500 Date: Thu, 06 Dec 2001 09:07:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Handling of structure dereferencing Message-ID: <20011206120739.A1490@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23i X-SW-Source: 2001-12/txt/msg00054.txt.bz2 Right now, and historically, gdb has accepted things like: struct foo {char a} *b, **c, ***d; (gdb) print b.a (gdb) print d->a This is tied to a collection of very messy values handling, where we will dereference pointers "as far as possible" in a lot of cases (like when looking for members). It makes printing structs somewhat "easier", but in my opinion, also rather more confusing. So, straw poll: how would people feel about: - not letting this happen; only explicit dereferencing [random thought] - and maybe, a print flag or something to allow us to print both the value of a pointer and the dereferenced type by default. I spend a lot of time doing "print longthing" up arrow "print longthing[0]" up arrow "print longthing[0].otherfield" to walk down things like "struct type"; it would be nice if there were a way to do the first two steps at the same time, since they are so very often associated. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer