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/testsuite/gdb.arch/thumb-prologue.exp | |
parent | *** empty log message *** (diff) | |
download | binutils-gdb-72a2e3dcf5c4dceb8e548d738b5373468d05655b.tar.gz binutils-gdb-72a2e3dcf5c4dceb8e548d738b5373468d05655b.tar.bz2 binutils-gdb-72a2e3dcf5c4dceb8e548d738b5373468d05655b.zip |
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/testsuite/gdb.arch/thumb-prologue.exp')
-rw-r--r-- | gdb/testsuite/gdb.arch/thumb-prologue.exp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.arch/thumb-prologue.exp b/gdb/testsuite/gdb.arch/thumb-prologue.exp index e685bc5853b..39b61c465a4 100644 --- a/gdb/testsuite/gdb.arch/thumb-prologue.exp +++ b/gdb/testsuite/gdb.arch/thumb-prologue.exp @@ -59,3 +59,30 @@ gdb_test "backtrace 10" \ gdb_test "info frame" \ ".*Saved registers:.*r7 at.*r10 at.*r11 at.*lr at.*" \ "saved registers in TPCS" + + +# Testcase for "switching" the stack to the same stack in the prologue. + +gdb_breakpoint "switch_stack_to_same" + +gdb_test "continue" "Breakpoint .*, $hex in switch_stack_to_same \\(\\)" \ + "continue to switch_stack_to_same" + +gdb_test "stepi 2" "in write_sp \\(\\)" "stepi over mov sp, sp" + +gdb_test "backtrace 10" \ + "#0\[ \t\]*$hex in write_sp .*\r\n#1\[ \t\]*$hex in switch_stack_to_same .*\r\n#2\[ \t\]*$hex in main.*" \ + "backtrace in write_sp" + +# Testcase for switching to another stack in the prologue. + +gdb_breakpoint "switch_stack_to_other" + +gdb_test "continue" "Breakpoint .*, $hex in switch_stack_to_other \\(\\)" \ + "continue to switch_stack_to_other" + +gdb_test "stepi 2" "in write_sp \\(\\)" "stepi over mov sp, 128" + +gdb_test "backtrace 10" \ + "#0\[ \t\]*$hex in write_sp .*\r\n#1\[ \t\]*$hex in switch_stack_to_other .*\r\n#2\[ \t\]*$hex in main.*" \ + "backtrace in write_sp" |