gdbarch: ABFD no longer available at gdbarch_update_p time

Andrew Cagney
Thu Jun 13 11:06:00 GMT 2002

> - global option is set
>> - architecture update is forced
>> -- architecture variant identified (using info, globals, and the last 
>> architecture)
> This bit I'm a bit fuzzy on.  Isn't the point that the last
> architecture might someday be CRIS - in 'set mips abi'?

It was the case - current_gdbarch could have been pointing to CRIS when 
you were selecting MIPS.

Two things changed:

- current_gdbarch is now set to NULL during an architecture update (so 
that can't be used)
- arches is kept sorted with most recently selected always at the front 
so that arches->gdbarch is ...

 >  Oh, from the
 > comment below it looks like you mean "the last architecture of this
 > family".  OK.


> For MIPS this means that I'm going to have to carry over:
>   osabi
>   some ABI information which may not be available, but I could probably
> save.
> The latter would be the case for 'set mips abi auto', if the binary had
> been loaded under 'set mips abi o32'.  We no longer know what the
> binary's ABI is but that is easy to fix.

Ah, yes, good point.  The abi from the binary and the one that was selected.


More information about the Gdb mailing list