From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Show padding in ptype/o output
Date: Fri, 18 May 2018 19:03:00 -0000 [thread overview]
Message-ID: <20180518185141.ihjr6fvfcqivtfss@adacore.com> (raw)
In-Reply-To: <87vabm2cvh.fsf@tromey.com>
> 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
prev parent reply other threads:[~2018-05-18 18:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 21:27 Tom Tromey
2018-05-18 0:25 ` Tom Tromey
2018-05-18 1:56 ` Sergio Durigan Junior
2018-05-18 19:03 ` Joel Brobecker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180518185141.ihjr6fvfcqivtfss@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox