Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Change ptype/o to print bit offset
Date: Mon, 29 Apr 2019 18:52:00 -0000	[thread overview]
Message-ID: <83zho8skya.fsf@gnu.org> (raw)
In-Reply-To: <20190429183105.15973-3-tromey@adacore.com> (message from Tom	Tromey on Mon, 29 Apr 2019 12:31:05 -0600)

> From: Tom Tromey <tromey@adacore.com>
> Cc: Tom Tromey <tromey@adacore.com>
> Date: Mon, 29 Apr 2019 12:31:05 -0600
> 
> With this patch, the output is now:
> 
>     (gdb) ptype/o struct outer
>     /* offset    |  size */  type = struct outer {
>     /*    0: 0   |     1 */    unsigned char o : 3;
>     /* XXX  5-bit hole  */
>     /*    1      |     8 */    struct inner {
>     /*    1      |     4 */        unsigned int x;
>     /*    5: 0   |     4 */        unsigned int y : 3;
>     /*    5: 3   |     4 */        unsigned int z : 3;
>     /* XXX  2-bit padding  */
>     /* XXX  3-byte padding */

This loses information, because now the bits part is just a trivial
conversion of the field size in the declaration.  The current display
shows something that cannot be trivially gleaned by looking at the
bitfield sizes.

I'm not objecting to the change, I'm just saying we lose something
here.

> gdb/doc/ChangeLog
> 2019-04-29  Tom Tromey  <tromey@adacore.com>
> 
> 	* gdb.texinfo (Symbols): Document change to ptype/o.

This seems to be a mechanical change, so OK.

Do we need to call this out in NEWS?

Thanks.


  reply	other threads:[~2019-04-29 18:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 18:31 [PATCH 0/2] two ptype/o changes Tom Tromey
2019-04-29 18:31 ` [PATCH 2/2] Change ptype/o to print bit offset Tom Tromey
2019-04-29 18:52   ` Eli Zaretskii [this message]
2019-04-29 18:57     ` Tom Tromey
2019-04-29 20:10   ` John Baldwin
2019-05-08 16:14 ` [PATCH 0/2] two ptype/o changes Tom Tromey

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=83zho8skya.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.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