[patch] ptype: show members of an unnamed struct inside an union

Joel Brobecker brobecker@adacore.com
Wed Aug 29 21:01:00 GMT 2007


> That's not quite true.  You need a variable, or to mess around with
> casting a pointer; you can't say "ptype my_type.member".

I hadn't realized this. I'm so used to doing it when debugging Ada
programs:

   (gdb) ptype rec
   type = record
       a: integer;
       b: integer;
   end record
   (gdb) ptype rec.a
   type = <4-byte integer>

-- 
Joel



More information about the Gdb-patches mailing list