Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: gdb-patches@sourceware.org
Subject: Re: [5/10] Add "explicit size" types to builtin_type
Date: Wed, 13 Jun 2007 14:10:00 -0000	[thread overview]
Message-ID: <200706131410.l5DEA7WJ012687@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20070612163217.GA6815@caradoc.them.org> from "Daniel Jacobowitz" at Jun 12, 2007 12:32:17 PM

Daniel Jacobowitz wrote:
> On Tue, Jun 12, 2007 at 06:24:39PM +0200, Ulrich Weigand wrote:
> > Hmmm.  One thing I liked about the approach in my patch was that
> > it in effect made *all* types gdbarch-specific.  This would have
> > allowed in the end to implement something like a get_type_arch ()
> > routine, which could be quite useful to push references to
> > current_gdbarch out of the symbol parts of the debugger (where
> > we often do not have a local gdbarch / frame / regcache argument,
> > but where we typically operate on types or values).
> 
> That seems to me like a bad idea.  We do not know the gdbarch when we
> read in the symbol file.  All references to the current architecture
> in the symbol readers are bogus - basically, they only work as long as
> the things referenced are the same between any other architectures we
> select.  Like pointer size, for instance.  Fortunately the file
> usually contains sufficient information for that purpose.

So are you suggesting that all references to gdbarch in the symbol
readers ought to be removed?  I'm not sure this is feasible, there
are in fact a number of gdbarch callbacks that specifically provide
information only to the symbol parts of GDB (like dwarf2_reg_to_regnum,
or something like skip_prologue).

What I had been thinking of is to explicitly assign a gdbarch to
each objfile (probably as an objfile->arch member).  Now this arch
is -as you mention- not necessarily the same as the "current"
architecture (what will become the per-thread / per-frame
architecture), but it will simply be the gdbarch selected by the
sniffers on the basis of the objfile (bfd) alone.  This arch would
then be used to provide per-platform configuration information to
the symbol parts of GDB.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2007-06-13 14:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-08 23:16 Ulrich Weigand
2007-06-12 15:22 ` Daniel Jacobowitz
2007-06-12 16:24   ` Ulrich Weigand
2007-06-12 16:32     ` Daniel Jacobowitz
2007-06-13 14:10       ` Ulrich Weigand [this message]
2007-06-13 14:19         ` Daniel Jacobowitz

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=200706131410.l5DEA7WJ012687@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=drow@false.org \
    --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