From: Daniel Jacobowitz <drow@false.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: Doug Evans <dje@google.com>, gdb-patches@sourceware.org
Subject: Re: Per-type architecture (Re: [10/15] Basic value access routines)
Date: Tue, 23 Jun 2009 17:30:00 -0000 [thread overview]
Message-ID: <20090623173016.GA29740@caradoc.them.org> (raw)
In-Reply-To: <200906231700.n5NH0Op5017747@d12av02.megacenter.de.ibm.com>
On Tue, Jun 23, 2009 at 07:00:24PM +0200, Ulrich Weigand wrote:
> We *do* need the architecture to interpret bitfield types; see e.g. the
> comment in gdbtypes.h:
>
> /* Position of this field, counting in bits from start of
> containing structure.
> For gdbarch_bits_big_endian=1 targets, it is the bit offset to the MSB.
> For gdbarch_bits_big_endian=0 targets, it is the bit offset to the LSB.
> For a range bound or enum value, this is the value itself. */
>
> int bitpos;
>
> and the various references to gdbarch_bits_big_endian (current_gdbarch)
> in unpack_field_as_long, modify_field, etc. There's no way to operate
> on a bitfield value without knowledge of this property.
You're right, we do - it's a very odd representation where we need the
endianness both to set and to use the position, if you ask me, but it
does tend to line up with symbol readers.
> OK, thanks. I've checked the patch in now.
Great. I'll let you know if I have any problems.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2009-06-23 17:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 15:20 [10/15] Basic value access routines Ulrich Weigand
2009-06-15 16:35 ` Doug Evans
2009-06-15 16:59 ` Ulrich Weigand
2009-06-22 20:32 ` Per-type architecture (Re: [10/15] Basic value access routines) Ulrich Weigand
2009-06-22 20:59 ` Daniel Jacobowitz
2009-06-23 0:41 ` Ulrich Weigand
2009-06-23 13:49 ` Daniel Jacobowitz
2009-06-23 14:02 ` Pedro Alves
2009-06-23 17:06 ` Ulrich Weigand
2009-06-23 17:30 ` Daniel Jacobowitz [this message]
2009-06-23 15:55 ` Doug Evans
2009-06-23 16:42 ` Mark Kettenis
2009-06-23 16:53 ` Daniel Jacobowitz
2009-06-23 16:57 ` Ulrich Weigand
2009-06-23 17:36 ` Doug Evans
2009-06-24 15:31 ` [10/15] Basic value access routines Tom Tromey
2009-06-24 15:46 ` Daniel Jacobowitz
2009-06-24 16:26 ` Doug Evans
2009-06-24 19:41 ` 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=20090623173016.GA29740@caradoc.them.org \
--to=drow@false.org \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.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