This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: ARM frame fp is not always FP_REGNUM
On Jul 4, 2000, Andrew Cagney <ac131313@cygnus.com> wrote:
> Alexandre Oliva wrote:
>> On ARM, it's register 11, which is a real register. But SP_REGNUM is
>> register 13. Then, when framereg == 13 in EXTRA_FRAME_INFO, `info
>> regs' will display the value of r13 for r11, and the actual value of
>> r11 cannot be obtained.
> How does this compare to when you do an info registers when at the inner
> most frame?
That's exactly the case.
Given this sample assembly program:
.global _start
_start:
mov r11, #1
After executing the first instruction, GDB will print:
(gdb) info reg
[...]
r11 0x800 2048
r12 0x0 0
sp 0x800 2048
[...]
(gdb) p $fp
$1 = 1
> This suggests that providing the ``$fp'' pseudo register is wrong for
> this target.
Or that, on ARM, $fp should obtain the value of frame->framereg,
instead of FP_REGNUM.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me