This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 2/2] Implement gdbarch hook user_register_name on ARM
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: yao at codesourcery dot com (Yao Qi)
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 21 Dec 2010 20:07:46 +0100 (CET)
- Subject: Re: [patch 2/2] Implement gdbarch hook user_register_name on ARM
Yao Qi wrote:
> On 12/15/2010 06:22 PM, Yao Qi wrote:
> > Once this patch is applied, we leave more flexibility to backend to
> > determine what is the correct register number given a register alias.
>
> This patch is to implement user_register_name on ARM. With this, we can
> handle alias "fp" according to the current frame's mode (ARM or Thumb).
>
> Regression testing is still running on ARM. Comments are welcome.
I'm wondering why the ARM back-end actively defines "fp" as user register
anyway. If it simply were to *not* do so, GDB would fall back to the
default implementation of $fp using value_of_builtin_frame_fp_reg, which
seems to do always the correct thing anyway. It returns the value of the
frame base as returned by arm_normal_frame_base, which will have been
determined from r11 or r7 as appropriate for the mode.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com