This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [03/05] Get rid of current_gdbarch in register_sim_regno
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: deuling at de dot ibm dot com (Markus Deuling)
- Cc: gdb-patches at sourceware dot org (GDB Patches)
- Date: Thu, 8 Nov 2007 22:37:29 +0100 (CET)
- Subject: Re: [rfc] [03/05] Get rid of current_gdbarch in register_sim_regno
Markus Deuling wrote:
> * gdbarch.sh (register_sim_regno): Add gdbarch as parameter.
> * gdbarch.{c,h}: Regenerate.
>
> * arch-utils.h (legacy_register_sim_regno): Add gdbarch as parameter.
> * score-tdep.c (score_register_sim_regno): Likewise.
>
> * arch-utils.c (legacy_register_sim_regno): Add gdbarch as parameter.
> Replace current_gdbarch by gdbarch.
> * sh-tdep.c (sh_sh2a_register_sim_regno)
> (sh_dsp_register_sim_regno): Likewise.
> * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
> * mips-tdep.c (mips_register_sim_regno): Likewise.
> * m32c-tdep.c (m32c_register_sim_regno): Likewise.
> * frv-tdep.c (frv_register_sim_regno): Likewise.
> * arm-tdep.c (arm_register_sim_regno): Likewise.
Those changes are OK, but you should at the same time
add the gdbarch parameter to the one2one_register_sim_regno
routine, since this is intended as a routine that can be
used as argument to gdbarch_set_register_sim_regno.
In fact, it would be good if you could also change the
*callers* of gdbarch_register_sim_regno to make sure
they really all have a gdbarch available.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com