Cast to a struct in expressions

Eli Zaretskii eliz@is.elta.co.il
Fri Apr 27 01:10:00 GMT 2001


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?



More information about the Gdb mailing list