From: Tom Tromey <tromey@redhat.com>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: unbreak typedefed bitfield
Date: Mon, 21 Dec 2009 17:08:00 -0000 [thread overview]
Message-ID: <m37hsgcl0p.fsf@fleche.redhat.com> (raw)
In-Reply-To: <hgngp7$qah$2@ger.gmane.org> (Vladimir Prus's message of "Mon, 21 Dec 2009 12:56:55 +0300")
>>>>> "Volodya" == Vladimir Prus <vladimir@codesourcery.com> writes:
Volodya> It seems to me that TYPE_LENGTH may return different values before and
Volodya> after check_typedef is called. Is the 'before' value ever or any use?
I don't think so. My understanding is that before check_typedef is
called, TYPE_LENGTH is not guaranteed to be valid.
Volodya> If no, and as you say above in some cases we need to preserve
Volodya> some properties of the typedef, why TYPE_LENGTH could not check
Volodya> if the type is typedef, and if so, return length of the true
Volodya> type?
check_typedef is misnamed and is also used to resolve opaque types.
Other than that, I don't know of a reason.
You could try:
#define TYPE_LENGTH(thistype) check_typedef (thistype)->length
While this is probably insufficient to fix the check_typedef problem in
general, it may help with the most common source of problems.
Tom
next prev parent reply other threads:[~2009-12-21 17:08 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
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 [this message]
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=m37hsgcl0p.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=vladimir@codesourcery.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