[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH] arm: fix reading SP register read
From: |
MyungJoo Ham |
Subject: |
[Libunwind-devel] [PATCH] arm: fix reading SP register read |
Date: |
Mon, 07 Mar 2016 10:34:48 +0000 (GMT) |
Partially reverting 0f9937485 while keeping
the part that disallowing writing to SP.
Signed-off-by: MyungJoo Ham <address@hidden>
---
src/arm/Gregs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/arm/Gregs.c b/src/arm/Gregs.c
index 688771f..0cc5552 100644
--- a/src/arm/Gregs.c
+++ b/src/arm/Gregs.c
@@ -51,6 +51,10 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg,
unw_word_t *valp,
break;
case UNW_ARM_R13:
+ if (write)
+ return -UNW_EREADONLYREG;
+ loc = c->dwarf.loc[reg - UNW_ARM_R0];
+ break;
case UNW_ARM_CFA:
if (write)
return -UNW_EREADONLYREG;
--
1.9.1
- [Libunwind-devel] [PATCH] arm: fix reading SP register read,
MyungJoo Ham <=