This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Cast to a struct in expressions
- To: gdb at sources dot redhat dot com
- Subject: Cast to a struct in expressions
- From: "Eli Zaretskii" <eliz at is dot elta dot co dot il>
- Date: Fri, 27 Apr 2001 11:11:08 +0300
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
Should the following work?
(gdb) p/x *(struct {long foo; unsigned bar;} *)foobar
It doesn't seem to work for me; GDB complains thusly:
A parse error in expression, near `long foo; unsigned bar} *)foobar
Seems like the parser chokes on the struct declaration? Am I missing
something?