diff mbox

[7/8] ARM: Return the dwarf.cfa in case the user requests SP/R13.

Message ID 1300895706-5424-8-git-send-email-ken.werner@linaro.org
State Accepted
Commit 0f9937485ea8c52cebd4512885d9e2decd5a3ddd
Headers show

Commit Message

Ken Werner March 23, 2011, 3:55 p.m. UTC
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>
---
 src/arm/Gregs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/src/arm/Gregs.c b/src/arm/Gregs.c
index 1546f58..03693a2 100644
--- a/src/arm/Gregs.c
+++ b/src/arm/Gregs.c
@@ -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_R11:
     case UNW_ARM_R12:
-    case UNW_ARM_R13:
     case UNW_ARM_R14:
     case UNW_ARM_R15:
       loc = c->dwarf.loc[reg - UNW_ARM_R0];
       break;
 
+    case UNW_ARM_R13:
     case UNW_ARM_CFA:
       if (write)
         return -UNW_EREADONLYREG;