From: Kevin Buettner <kevinb@redhat.com>
To: Elena Zannoni <ezannoni@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] rs6000-tdep.c: arch switching buglet
Date: Wed, 13 Feb 2002 17:15:00 -0000 [thread overview]
Message-ID: <1020214011340.ZM9352@localhost.localdomain> (raw)
In-Reply-To: Elena Zannoni <ezannoni@redhat.com> "[RFA] rs6000-tdep.c: arch switching buglet" (Feb 12, 10:47am)
On Feb 12, 10:47am, Elena Zannoni wrote:
> I found an odd bug on the ppc.
>
> For this target, the list of arches in bfd includes
> several that are not rupported in gdb, for instance powerpc:630.
>
> If the user says:
>
> set architecture powerpc:630
>
> What should happen?
>
> set_architecture() calls gdbarch_update_p, which should fail (right?),
> and set_architecture should print an error message.
>
> Instead, consider the rs6000 code in rs6000_gdbarch_init():
>
> /* Choose variant. */
> v = find_variant_by_arch (arch, mach);
> if (!v)
> v = find_variant_by_name (power ? "power" : "powerpc");
>
> This code will pick a different architecture, in this case
> powerpc:common, but gdb/multiarch doesn't know, and prints that the
> architecture has been successfully set to powerpc:630.
>
> This code was put in place before the multiarch framework, and it has
> become obsolete. So, how about the following:
>
>
> 2002-02-12 Elena Zannoni <ezannoni@redhat.com>
>
> * rs6000-tdep.c (rs6000_gdbarch_init): Don't call
> find_variant_by_name, because it confuses the multiarch
> framework. Return NULL if there isn't an architecture with the
> user supplied name, instead of forcing a different one without
> recording the change with the multiarch machinery.
> (find_variant_by_name): Delete.
It took me a while to convince myself that find_variant_by_name()
wouldn't be useful in the future. But, you're right, this code should
go. Please commit it.
Thanks,
Kevin
next prev parent reply other threads:[~2002-02-14 1:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-12 7:47 Elena Zannoni
2002-02-13 17:15 ` Kevin Buettner [this message]
2002-02-14 7:14 ` Elena Zannoni
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=1020214011340.ZM9352@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.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