This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v2 3/7] Fix for bug in pop instruction decoding
- From: Omair Javaid <omair dot javaid at linaro dot org>
- To: gdb-patches at sourceware dot org
- Cc: patches at linaro dot org
- Date: Sat, 4 Jan 2014 00:15:32 +0500
- Subject: [PATCH v2 3/7] Fix for bug in pop instruction decoding
- Authentication-results: sourceware.org; auth=none
- References: <y> <cover dot 1388709773 dot git dot omair dot javaid at linaro dot org>
- References: <cover dot 1388709773 dot git dot omair dot javaid at linaro dot org>
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