This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] Swap out current when creating a new architecture
- To: Orjan Friberg <orjan dot friberg at axis dot com>
- Subject: Re: [rfc] Swap out current when creating a new architecture
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sun, 14 Oct 2001 20:06:59 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <3BB16441.30805@cygnus.com> <3BB771A1.4070201@cygnus.com> <3BB854B3.208DC17A@axis.com>
>
> Just a quick recap: what the old code was doing by referring to
> current_gdbarch was to avoid changing the ABI (which I infer from the
> bfd) if one of the other target specific commands were being used. The
> patch below sets the abfd field in the info struct to exec_bfd before
> calling gdbarch_update_p, so that information on the current bfd is
> passed along, just as it is when gdbarch_update_p is called from
> set_gdbarch_from_file.
>
> Is this an acceptable way of doing it? I know I'm in the risky business
> of dealing with global pointers. (I'm assuming a commit could go on
> both trunk and branch.)
Nice bug! I need to think about this some more though.
As for the branch, no need as I'm not committing my change to that.
Andrew