[rfc] Remove current_gdbarch register handling from symbol readers

Ulrich Weigand uweigand@de.ibm.com
Thu Jun 4 12:36:00 GMT 2009


> this patch removes most of the remaining instances of current_gdbarch 
> from the symbol readers.  These are all related to handling register
> numbers.   The problem is that during symbol reading, we may not
> actually know the GDB register numbers for the target -- those may
> change once we actually connect to a target which may provide its
> own target description.
> 
> What the patch does is to delay register renaming by storing the
> original number from the debug info into SYMBOL_VALUE, and perform
> the conversion to a GDB register number only when debug info is
> actually used -- at which time we must have a frame context in
> order to evaluate "register" symbols, so we can use the correct
> architecture.
> 
> This is implemented by extending the SYMBOL_OPS field, which is
> currently only used for LOC_COMPUTED types, to also provide
> callback routine for LOC_REGISTER (and LOC_REGPARM_ADDR) types.
> All symbol readers using those types are adapted to provide
> an appropriate implementation of the callback.

I've now checked in this patch as well.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com



More information about the Gdb-patches mailing list