1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-03-13 19:50:08 +01:00

ARM: Return the dwarf.cfa in case the user requests SP/R13.

Usually we don't have a valid location for the SP but we keep calculating
the value of the CFA. The ARM backend should return this value instead.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
This commit is contained in:
Ken Werner 2011-03-23 15:55:05 +00:00 committed by Arun Sharma
parent f053677198
commit 0f9937485e

View file

@ -45,12 +45,12 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
case UNW_ARM_R10: case UNW_ARM_R10:
case UNW_ARM_R11: case UNW_ARM_R11:
case UNW_ARM_R12: case UNW_ARM_R12:
case UNW_ARM_R13:
case UNW_ARM_R14: case UNW_ARM_R14:
case UNW_ARM_R15: case UNW_ARM_R15:
loc = c->dwarf.loc[reg - UNW_ARM_R0]; loc = c->dwarf.loc[reg - UNW_ARM_R0];
break; break;
case UNW_ARM_R13:
case UNW_ARM_CFA: case UNW_ARM_CFA:
if (write) if (write)
return -UNW_EREADONLYREG; return -UNW_EREADONLYREG;