This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [rfc] Swap out current when creating a new architecture


> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]