Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: Elena Zannoni <ezannoni@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] rs6000-tdep.c: arch switching buglet
Date: Thu, 14 Feb 2002 07:14:00 -0000	[thread overview]
Message-ID: <15467.54335.30953.137640@localhost.redhat.com> (raw)
In-Reply-To: <1020214011340.ZM9352@localhost.localdomain>


Committed, thanks

Elena


Kevin Buettner writes:
 > 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


      reply	other threads:[~2002-02-14 15:14 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
2002-02-14  7:14   ` Elena Zannoni [this message]

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=15467.54335.30953.137640@localhost.redhat.com \
    --to=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@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