THUMB_FP vs. ARM_FP

Michael Snyder msnyder@redhat.com
Thu Sep 5 11:37:00 GMT 2002


Richard Earnshaw wrote:
> 
> > 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.
> 

Committed.



More information about the Gdb-patches mailing list