[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] arm: issue of reading SP register
From: |
MyungJoo Ham |
Subject: |
Re: [Libunwind-devel] arm: issue of reading SP register |
Date: |
Mon, 07 Mar 2016 07:29:54 +0000 (GMT) |
From 43aeb2fe60ad3c93a2d550ecdc8490ab286319be Mon Sep 17 00:00:00 2001
From: MyungJoo Ham <address@hidden>
Date: Thu, 25 Feb 2016 10:24:12 +0900
Subject: [PATCH] arm: fix reading SP register read
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