Index: gdb/testsuite/gdb.arch/thumb-bx-pc.exp |
diff --git a/gdb/testsuite/gdb.arch/thumb-singlestep.exp b/gdb/testsuite/gdb.arch/thumb-bx-pc.exp |
similarity index 62% |
copy from gdb/testsuite/gdb.arch/thumb-singlestep.exp |
copy to gdb/testsuite/gdb.arch/thumb-bx-pc.exp |
index 1e78a169efa9c62990da5053fc6b9cf7b83fe379..e11f54fbbad4c5306380406141b0b4745d500e7a 100644 |
--- a/gdb/testsuite/gdb.arch/thumb-singlestep.exp |
+++ b/gdb/testsuite/gdb.arch/thumb-bx-pc.exp |
@@ -1,4 +1,4 @@ |
-# Copyright 2011-2012 Free Software Foundation, Inc. |
+# Copyright 2012-2013 Free Software Foundation, Inc. |
# This program is free software; you can redistribute it and/or modify |
# it under the terms of the GNU General Public License as published by |
@@ -13,26 +13,29 @@ |
# You should have received a copy of the GNU General Public License |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
-# Test single-stepping into incorrectly marked Thumb routine |
+# Test PC adjustment from Thumb-mode "bx pc" instruction. |
if {![istarget arm*-*]} then { |
verbose "Skipping ARM tests." |
return |
} |
-set testfile "thumb-singlestep" |
+set testfile "thumb-bx-pc" |
set srcfile ${testfile}.S |
+set opts {} |
-set additional_flags "additional_flags=-mthumb" |
-if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} [list debug $additional_flags]] { |
- untested ${testfile}.exp |
+if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] { |
+ untested "Failed to compile $srcfile" |
return -1 |
} |
if ![runto_main] then { |
- untested ${testfile}.exp |
+ untested "could not run to main" |
return -1 |
} |
-gdb_test "si" "foo \\(\\) at .*${srcfile}.*mov r0,#42.*" "step into foo" |
+gdb_test "stepi" "$hex in main \\(\\)" "stepi for bx pc" |
+gdb_test "x /i \$pc" \ |
+ "$hex <main\\+4>:\[ \t\]+mov\[ \t\]+r0,\[ \t\]+#0.*" \ |
+ "stepi reached correct instruction" |