Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [10/15] Basic value access routines
Date: Mon, 15 Jun 2009 16:35:00 -0000	[thread overview]
Message-ID: <e394668d0906150935p7f742225g808bdc6219c6ac12@mail.gmail.com> (raw)
In-Reply-To: <200906091519.n59FJjNr000518@d12av02.megacenter.de.ibm.com>

On Tue, Jun 9, 2009 at 8:19 AM, Ulrich Weigand<uweigand@de.ibm.com> wrote:
> Hello,
>
> a number of core data conversion routines deeply buried in the
> call chain implicitly use current_gdbarch to determine the format
> of the data (address/pointer conversion, floating point formats).
>
> This patch adds an explicit gdbarch argument to the following
> routines to eliminate that use, and updates all call sites:
>
> - unpack_long/unpack_double/unpack_pointer/pack_long
> - extract_typed_address/store_typed_address/read_memory_typed_address
> - extract_typed_floating/store_typed_floating/convert_typed_floating
> - floatformat_from_type

Can a struct type (or struct main_type) ever be associated with more
than one architecture?
[And if they can, is that correct given things like struct
main_type.fields, struct type.length (and a few others)?]

And if a struct type (or struct main_type) can (or should) only be
associated with one architecture can we make it so that we can obtain
the architecture given the type?
That would seem to simplify things.

[I realize there's type->main_type->objfile->gdbarch, but it's not
clear to me that this will always be the correct one to use.  Maybe it
is.
I also realize struct main_type is space critical, struct type is not
marked as such but maybe it is too.
I'd still hate to lose the simplicity gained by being able to
determine an arch given just the type.
Maybe there's a way to have both.]

Thoughts?


  reply	other threads:[~2009-06-15 16:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09 15:20 Ulrich Weigand
2009-06-15 16:35 ` Doug Evans [this message]
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
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=e394668d0906150935p7f742225g808bdc6219c6ac12@mail.gmail.com \
    --to=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