diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7bc1d03..1ccacd3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2014-07-11 Yao Qi <yao@codesourcery.com> + * arm-tdep.c (thumb_analyze_prologue): Break the loop if + thumb_instruction_restores_sp return true. + +2014-07-11 Yao Qi <yao@codesourcery.com> + * arm-tdep.c (thumb_instruction_restores_sp): New function. (thumb_in_function_epilogue_p): Call thumb_instruction_restores_sp. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 0e7d9c2..cb0030c 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -754,6 +754,11 @@ thumb_analyze_prologue (struct gdbarch *gdbarch, regs[ARM_SP_REGNUM] = pv_add_constant (regs[ARM_SP_REGNUM], -offset); } + else if (thumb_instruction_restores_sp (insn)) + { + /* Don't scan past the epilogue. */ + break; + } else if ((insn & 0xf800) == 0xa800) /* add Rd, sp, #imm */ regs[bits (insn, 8, 10)] = pv_add_constant (regs[ARM_SP_REGNUM], (insn & 0xff) << 2); |