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: gdb-patches at sources dot redhat dot com
- Subject: Re: [rfc] Swap out current when creating a new architecture
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sun, 30 Sep 2001 15:25:21 -0400
- References: <3BB16441.30805@cygnus.com>
> The attached changes the run-time environment within which a new architectures are created. Briefly the simplified sequence:
>
> - call XXX_gdbarch_init()
> - swap out old architecture
> - install new architecture
>
> is changed to:
>
> - swap out old architecture
> - call XX_gdbarch_init()
> - install new architecture
>
> This has the effect of making current_gdbarch invalid for the lifetime of the XXX_gdbarch_init() call.
>
This patch is evi^D^D^D nasty.
The CRIS target also dumps core with it applied. Like rs6000 was, it is
refering to the previous (current_gdbarch) architecture.
I'll sit on this for a bit longer. Could I encourage target maintainers
to check their XXX_gdbarch_init() function for references to
current_gdbarch.
Andrew