This is the mail archive of the 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]
Other format: [Raw text]

Re: [rfc] Remove current_gdbarch register handling from symbol readers

> 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.


  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE

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