[rfc] Swap out current when creating a new architecture

Andrew Cagney ac131313@cygnus.com
Wed Sep 26 23:06:00 GMT 2001


> 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




More information about the Gdb-patches mailing list