arm_addr_bits_remove: Stop believing in the existence of 26-bit Thumb.
arm_frame_saved_pc: Use arm_addr_bits_remove to strip the retrieved PC. These seem to make stack backtraces work on arm26.
This commit is contained in:
parent
a9ec452d57
commit
f3da28335b
|
@ -270,10 +270,12 @@ arm_pc_is_thumb_dummy (bfd_vma memaddr)
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
arm_addr_bits_remove (CORE_ADDR val)
|
arm_addr_bits_remove (CORE_ADDR val)
|
||||||
{
|
{
|
||||||
if (arm_pc_is_thumb (val))
|
if (arm_apcs_32)
|
||||||
return (val & (arm_apcs_32 ? 0xfffffffe : 0x03fffffe));
|
return (val & 0x03fffffc);
|
||||||
|
else if (arm_pc_is_thumb (val))
|
||||||
|
return (val & 0xfffffffe);
|
||||||
else
|
else
|
||||||
return (val & (arm_apcs_32 ? 0xfffffffc : 0x03fffffc));
|
return (val & 0xfffffffc);
|
||||||
}
|
}
|
||||||
|
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
|
@ -1019,7 +1021,7 @@ arm_frame_saved_pc (struct frame_info *fi)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
CORE_ADDR pc = arm_find_callers_reg (fi, LR_REGNUM);
|
CORE_ADDR pc = arm_find_callers_reg (fi, LR_REGNUM);
|
||||||
return IS_THUMB_ADDR (pc) ? UNMAKE_THUMB_ADDR (pc) : pc;
|
return arm_addr_bits_remove(pc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue