This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Cast to a struct in expressions


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]