This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: THUMB_FP vs. ARM_FP
- From: Richard Earnshaw <rearnsha at cambridge dot arm dot com>
- To: Michael Snyder <msnyder at cygnus dot com>
- Cc: rearnsha at arm dot com, gdb-patches at sources dot redhat dot com
- Date: Thu, 05 Sep 2002 14:44:29 +0100
- Subject: Re: THUMB_FP vs. ARM_FP
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> By the way, Richard, shouldn't this
>
> *************** arm_init_extra_frame_info (int fromleaf,
> *** 1162,1168 ****
>
> callers_sp = read_memory_integer (fi->saved_regs[ARM_SP_REGNUM],
> REGISTER_RAW_SIZE (ARM_SP_REGNUM));
> ! fi->extra_info->framereg = ARM_FP_REGNUM;
> fi->extra_info->framesize = callers_sp - sp;
> fi->extra_info->frameoffset = fi->frame - sp;
> }
> ...be something like this?
>
> --- 1162,1171 ----
>
> callers_sp = read_memory_integer (fi->saved_regs[ARM_SP_REGNUM],
> REGISTER_RAW_SIZE (ARM_SP_REGNUM));
> ! if (arm_pc_is_thumb (fi->pc))
> ! fi->extra_info->framereg = THUMB_FP_REGNUM;
> ! else
> ! fi->extra_info->framereg = ARM_FP_REGNUM;
> fi->extra_info->framesize = callers_sp - sp;
> fi->extra_info->frameoffset = fi->frame - sp;
> }
Probably. The idea of a frame pointer in thumb is a bit strange, given
that the architecture really dislikes having one, but I see no harm in the
change, and it's certainly wrong to use the ARM one in Thumb mode.
R.