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: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [rfc] Swap out current when creating a new architecture
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 27 Sep 2001 02:06:31 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <3BB16441.30805@cygnus.com> <1010927055546.ZM3074@ocotillo.lan>
> I'm wondering though if it might be possible to set current_gdbarch
> to the architecture currently getting defined. This way, it would
> be possible to do things like:
>
> gdbarch->target_long_bit = 8;
> gdbarch->target_long_long_bit = 2*TARGET_LONG_BIT;
>
Another option other is to rename the local variable ``gdbarch'' to
``current_gdbarch''. Check my other patch to gdbarch_alloc() which was
forced to do just that.
Personally, though, I'd prefer to be doing none of the above. Instead
just eliminate that global current_gdbarch and parameterize everthing
.... :-)
enjoy,
Andrew