diff options
author | Yao Qi <yao@codesourcery.com> | 2011-02-15 14:26:34 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2011-02-15 14:26:34 +0000 |
commit | 494e194e77ee1e03d260268fc132dccf308f223e (patch) | |
tree | 49847f1526839f4fd742587aef1a9901ed36ed93 /gdb/testsuite/gdb.arch/arm-disp-step.exp | |
parent | d9492458a11ca366f79a4c8fb03e312bfe0b047e (diff) | |
download | fsf-binutils-gdb-494e194e77ee1e03d260268fc132dccf308f223e.zip fsf-binutils-gdb-494e194e77ee1e03d260268fc132dccf308f223e.tar.gz fsf-binutils-gdb-494e194e77ee1e03d260268fc132dccf308f223e.tar.bz2 |
2011-02-15 Yao Qi <yao@codesourcery.com>
PR tdep/12352
* arm-tdep.c (copy_ldr_str_ldrb_strb): Replace PC with SP in
order to store PC value on stack instead of text section.
2011-02-15 Yao Qi <yao@codesourcery.com>
PR tdep/12352
* gdb.arch/arm-disp-step.S : New test for str instruction.
* gdb.arch/arm-disp-step.exp : Likewise
Diffstat (limited to 'gdb/testsuite/gdb.arch/arm-disp-step.exp')
-rw-r--r-- | gdb/testsuite/gdb.arch/arm-disp-step.exp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.arch/arm-disp-step.exp b/gdb/testsuite/gdb.arch/arm-disp-step.exp index 841bfce..3bea521 100644 --- a/gdb/testsuite/gdb.arch/arm-disp-step.exp +++ b/gdb/testsuite/gdb.arch/arm-disp-step.exp @@ -126,6 +126,42 @@ proc test_ldr_from_pc {} { ".*bx lr.*" } +########################################### + +proc test_str_pc {} { + global srcfile + gdb_test_multiple "break *test_str_pc" "break test_str_pc" { + -re "Breakpoint.*at.* file .*$srcfile, line.*" { + pass "break test_str_pc" + } + -re "No symbol.*" { + pass "break test_str_pc" + return + } + } + gdb_test "break *test_str_pc_end" \ + "Breakpoint.*at.* file .*$srcfile, line.*" \ + "break test_str_pc_end" + + # Set breakpoint on both lables pc_offset_right and pc_offset_wrong + gdb_test "break *pc_offset_right" \ + "Breakpoint.*at.* file .*$srcfile, line.*" \ + "break pc_offset_right" + gdb_test "break *pc_offset_wrong" \ + "Breakpoint.*at.* file .*$srcfile, line.*" \ + "break pc_offset_wrong" + + gdb_continue_to_breakpoint "continue to test_str_pc" \ + ".*str.*pc\,.*\[sp, #-4\].*" + # If breakpoint on lable pc_offset_wrong is hit, that means the offset + # computed in displaced stepping is different from offset computed + # without displaced stepping. Report a failure. + gdb_continue_to_breakpoint "continue to pc_offset_right" \ + ".*b.*test_str_pc_end.*" + gdb_continue_to_breakpoint "continue to test_str_pc_end" \ + ".*bx lr.*" +} + # Get things started. clean_restart ${testfile} @@ -165,6 +201,7 @@ test_ldr_from_pc test_ldm_stm_pc +test_str_pc ########################################## # Done, run program to exit. |