This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Show padding in ptype/o output
> commit f4c9741648a991f4591b290000214a9dbaf8099a
> Author: Tom Tromey <tom@tromey.com>
> Date: Sat May 12 17:04:50 2018 -0600
>
> Show padding in ptype/o output
>
> I was recently using ptype/o to look at the layout of some objects in
> gdb. I noticed that trailing padding was not shown -- but I wanted to
> be able to look at that, too.
>
> This patch changes ptype/o to also print trailing holes.
>
> Tested on x86-64 Fedora 26.
>
> gdb/ChangeLog
> 2018-05-17 Tom Tromey <tom@tromey.com>
>
> * c-typeprint.c (maybe_print_hole): New function.
> (c_print_type_struct_field_offset): Update.
> (c_type_print_base_struct_union): Call maybe_print_hole.
>
> gdb/testsuite/ChangeLog
> 2018-05-17 Tom Tromey <tom@tromey.com>
>
> * gdb.base/ptype-offsets.exp: Update.
Looks good to me, Tom.
Thanks for this enhancement!
--
Joel