This is the mail archive of the
mailing list for the GDB project.
Re: [rfc] Remove current_gdbarch register handling from symbol readers
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: uweigand at de dot ibm dot com (Ulrich Weigand)
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 4 Jun 2009 14:35:59 +0200 (CEST)
- Subject: 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
> 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