[PATCH v2 3/7] Fix for bug in pop instruction decoding

Omair Javaid omair.javaid@linaro.org
Fri Jan 3 19:16:00 GMT 2014


This patch fixes thumb push instruction recording by replacing base register
from pc to sp.

gdb:

2014-01-03  Omair Javaid  <omair.javaid@linaro.org>

	* arm-tdep.c (thumb_record_misc): Update to use sp as base register for
	push instruction recording.

---
 gdb/arm-tdep.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 24bacf8..f7a214f 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -12212,7 +12212,7 @@ thumb_record_misc (insn_decode_record *thumb_insn_r)
     {
       /* PUSH.  */
       register_bits = bits (thumb_insn_r->arm_insn, 0, 7);
-      regcache_raw_read_unsigned (reg_cache, ARM_PC_REGNUM, &u_regval);
+      regcache_raw_read_unsigned (reg_cache, ARM_SP_REGNUM, &u_regval);
       while (register_bits)
         {
           if (register_bits & 0x00000001)
-- 
1.7.9.5



More information about the Gdb-patches mailing list