This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Handling of structure dereferencing
- From: "Eli Zaretskii" <eliz at is dot elta dot co dot il>
- To: drow at mvista dot com
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 06 Dec 2001 21:47:50 +0200
- Subject: Re: Handling of structure dereferencing
- References: <20011206120739.A1490@nevyn.them.org>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> Date: Thu, 6 Dec 2001 12:07:39 -0500
> From: Daniel Jacobowitz <drow@mvista.com>
>
> 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.