diff options
author | Meador Inge <meadori@sourceware.org> | 2011-11-09 00:53:40 +0000 |
---|---|---|
committer | Meador Inge <meadori@sourceware.org> | 2011-11-09 00:53:40 +0000 |
commit | 72a2e3dcf5c4dceb8e548d738b5373468d05655b (patch) | |
tree | d448b68f853b7b18de2815749705879fee3e3b88 /gdb/arm-tdep.c | |
parent | 6a12077df4f990359fe9dd97c419b05a169d7503 (diff) | |
download | gdb-72a2e3dcf5c4dceb8e548d738b5373468d05655b.zip gdb-72a2e3dcf5c4dceb8e548d738b5373468d05655b.tar.gz gdb-72a2e3dcf5c4dceb8e548d738b5373468d05655b.tar.bz2 |
gdb/
* arm-tdep.c (thumb_analyze_prologue): Always fallback on the SP
register when the frame can't be determined.
* arm-tdep.c (arm_analyze_prologue): Ditto.
gdb/testsuite/
* gdb.arch/thumb-prologue.c (switch_stack_to_same): New test function.
(switch_stack_to_other): New test function.
* gdb.arch/thumb-prologue.exp: New test cases.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 3337248..4cd11d4 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1152,18 +1152,12 @@ thumb_analyze_prologue (struct gdbarch *gdbarch, cache->framereg = THUMB_FP_REGNUM; cache->framesize = -regs[THUMB_FP_REGNUM].k; } - else if (pv_is_register (regs[ARM_SP_REGNUM], ARM_SP_REGNUM)) + else { /* Try the stack pointer... this is a bit desperate. */ cache->framereg = ARM_SP_REGNUM; cache->framesize = -regs[ARM_SP_REGNUM].k; } - else - { - /* We're just out of luck. We don't know where the frame is. */ - cache->framereg = -1; - cache->framesize = 0; - } for (i = 0; i < 16; i++) if (pv_area_find_reg (stack, gdbarch, i, &offset)) @@ -1883,18 +1877,12 @@ arm_analyze_prologue (struct gdbarch *gdbarch, framereg = ARM_FP_REGNUM; framesize = -regs[ARM_FP_REGNUM].k; } - else if (pv_is_register (regs[ARM_SP_REGNUM], ARM_SP_REGNUM)) + else { /* Try the stack pointer... this is a bit desperate. */ framereg = ARM_SP_REGNUM; framesize = -regs[ARM_SP_REGNUM].k; } - else - { - /* We're just out of luck. We don't know where the frame is. */ - framereg = -1; - framesize = 0; - } if (cache) { |