From: Vladimir Prus <vladimir@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org
Subject: Re: RFA: unbreak typedefed bitfield
Date: Fri, 18 Dec 2009 14:20:00 -0000 [thread overview]
Message-ID: <200912181720.19470.vladimir@codesourcery.com> (raw)
In-Reply-To: <20091218141740.GA18065@caradoc.them.org>
On Friday 18 December 2009 17:17:40 Daniel Jacobowitz wrote:
> On Fri, Dec 18, 2009 at 05:06:12PM +0400, Joel Brobecker wrote:
> > > --- a/gdb/value.c
> > > +++ b/gdb/value.c
> > > @@ -1873,6 +1873,7 @@ value_primitive_field (struct value *arg1, int offset,
> > >
> > > CHECK_TYPEDEF (arg_type);
> > > type = TYPE_FIELD_TYPE (arg_type, fieldno);
> > > + check_typedef (type);
> > >
> > > /* Handle packed fields */
> >
> > Looks OK to me (you forgot the ChangeLog entry, btw).
>
> What does this do? CHECK_TYPEDEF side-effects its argument;
> check_typedef will leave its argument as a TYPE_CODE_TYPEDEF. I think
> it fills in some other fields in the typedef, is that what matters
> here?
Yes. It makes
int container_bitsize = TYPE_LENGTH (type) * 8;
below not to set 'container_bitsize' to 0.
> It's unusual to see check_typedef without an assignment.
I can surely use
type = check_typedef (type);
if that seems less confusing.
- Volodya
next prev parent reply other threads:[~2009-12-18 14:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 12:41 Vladimir Prus
2009-12-18 13:06 ` Joel Brobecker
2009-12-18 14:17 ` Daniel Jacobowitz
2009-12-18 14:20 ` Vladimir Prus [this message]
2009-12-18 14:24 ` Daniel Jacobowitz
2009-12-21 9:51 ` Vladimir Prus
2009-12-21 13:23 ` Joel Brobecker
2009-12-18 19:55 ` Tom Tromey
2009-12-21 10:00 ` Vladimir Prus
2009-12-21 17:08 ` Tom Tromey
2009-12-21 17:15 ` Daniel Jacobowitz
2009-12-21 17:18 ` Vladimir Prus
2009-12-21 17:37 ` Joel Brobecker
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=200912181720.19470.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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