Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Orjan Friberg <orjan.friberg@axis.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc] Swap out current when creating a new architecture
Date: Tue, 16 Oct 2001 01:59:00 -0000	[thread overview]
Message-ID: <3BCBF6E3.73B404@axis.com> (raw)
In-Reply-To: <3BCB902A.8090003@cygnus.com>

Andrew Cagney wrote:
> 
> Really nice bug!
> 
> The proposed change unfortunatly isn't right for reasons similar to the
> original current_gdbarch problem.  The exec file might belong to a
> completely different architecture.  Consider a sequence like:
> 
>         (gdb) file hello.d10v
>         (gdb) info architecture
>         The current architecture is d10v
>         (gdb) set cris-mode CRIS_MODE_USER

Hm, I had a feeling I was just moving the problem elsewhere, though I
didn't think of the case of having gdb configured for two
architectures.  But with multi-arch I guess this is not just a remote
possibility.

> For MIPS, the problem has so far been avoided by coding functions as:
> 
>         if (set by user)
>           return user value;
>         else
>           return value from architecture;
> 

From looking at the MIPS target just now I thought it would suffer from
the same problem when it comes to guessing the ABI (since info.abfd is
used if present).  But then I saw that the functions tied to the MIPS
specific user-commands don't call gdbarch_update, they change
current_gdbarch directly.  I'm going to try something similar.

Thanks,
Orjan

-- 
Orjan Friberg              E-mail: orjan.friberg@axis.com
Axis Communications AB     Phone:  +46 46 272 17 68


      reply	other threads:[~2001-10-16  1:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3BB16441.30805@cygnus.com>
2001-09-26 22:56 ` Kevin Buettner
2001-09-26 23:06   ` Andrew Cagney
2001-09-30 12:25 ` Andrew Cagney
2001-10-01  4:34   ` Orjan Friberg
2001-10-14 17:07     ` Andrew Cagney
2001-10-15 18:41       ` Andrew Cagney
2001-10-16  1:59         ` Orjan Friberg [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=3BCBF6E3.73B404@axis.com \
    --to=orjan.friberg@axis.com \
    --cc=ac131313@cygnus.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