From: Daniel Jacobowitz <drow@false.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] PowerPC ABI detection and overrides
Date: Mon, 29 Oct 2007 19:16:00 -0000 [thread overview]
Message-ID: <20071029191328.GA13900@caradoc.them.org> (raw)
In-Reply-To: <200710291859.l9TIx0k9006357@d12av02.megacenter.de.ibm.com>
On Mon, Oct 29, 2007 at 07:59:00PM +0100, Ulrich Weigand wrote:
> Thinking about the problem I had at the time, maybe the real issue
> is that those features detected from the BFD are not considered
> as distinuishing factors when deciding whether to set up a new
> gdbarch or return a cached one:
>
> /* Find a candidate among extant architectures. */
> for (arches = gdbarch_list_lookup_by_info (arches, &info);
> arches != NULL;
> arches = gdbarch_list_lookup_by_info (arches->next, &info))
> {
> /* Word size in the various PowerPC bfd_arch_info structs isn't
> meaningful, because 64-bit CPUs can run in 32-bit mode. So, perform
> separate word size check. */
> tdep = gdbarch_tdep (arches->gdbarch);
> if (tdep && tdep->wordsize == wordsize)
> {
> if (tdesc_data != NULL)
> tdesc_data_cleanup (tdesc_data);
> return arches->gdbarch;
> }
> }
>
>
> Note that gdbarch_list_lookup_by_info ignores the info.abfd field.
> This means that if you first looked up any PPC gdbarch without specifying
> a BFD, and later on you look up a PPC gdbarch with BFD, you'll get that
> first gdbarch returned from the cache, even though it doesn't actually
> fit the current properties.
Ignoring abfd is deliberate; we should be able to construct the same
arch with or without a BFD. But ignoring things derived from abfd is
a bug indeed. The MIPS target stashes ELF flags in its tdep structure
for this reason. PowerPC may not need that heavyweight check, but it
does need some other things, e.g., sysv_abi. Actually that's the only
one that I see that ought to be checked. Maybe that will fix the bug?
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-10-29 19:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-21 13:05 [commit] Use -mabi=altivec for AltiVec tests Ulrich Weigand
2007-10-21 18:08 ` Daniel Jacobowitz
2007-10-21 19:37 ` Ulrich Weigand
2007-10-24 20:47 ` Daniel Jacobowitz
2007-10-29 18:04 ` Ulrich Weigand
2007-10-29 18:06 ` Daniel Jacobowitz
2007-10-29 18:32 ` Ulrich Weigand
2007-10-25 20:32 ` [rfc] PowerPC ABI detection and overrides Daniel Jacobowitz
2007-10-29 18:27 ` Ulrich Weigand
2007-10-29 18:38 ` Daniel Jacobowitz
2007-10-29 19:02 ` Ulrich Weigand
2007-10-29 19:16 ` Daniel Jacobowitz [this message]
2007-10-29 19:27 ` Ulrich Weigand
2007-10-30 20:12 ` Daniel Jacobowitz
2007-10-30 21:12 ` Ulrich Weigand
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=20071029191328.GA13900@caradoc.them.org \
--to=drow@false.org \
--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