aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.multi/multi-arch-exec.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.multi/multi-arch-exec.exp')
-rw-r--r--gdb/testsuite/gdb.multi/multi-arch-exec.exp24
1 files changed, 17 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.exp b/gdb/testsuite/gdb.multi/multi-arch-exec.exp
index ed98532..27a0d60 100644
--- a/gdb/testsuite/gdb.multi/multi-arch-exec.exp
+++ b/gdb/testsuite/gdb.multi/multi-arch-exec.exp
@@ -76,12 +76,22 @@ if { [prepare_for_testing "failed to prepare" ${exec2} "${srcfile2}" \
return -1
}
-clean_restart ${exec1}
-if ![runto_main] then {
- fail "couldn't run to main"
- return -1
+proc do_test { mode } {
+ global exec1
+
+ clean_restart ${exec1}
+ if ![runto_main] then {
+ fail "couldn't run to main"
+ return -1
+ }
+
+ gdb_test_no_output "set follow-exec-mode $mode"
+
+ # Test that GDB updates the target description / arch successfuly
+ # after the exec.
+ gdb_test "continue" "Breakpoint 1, main.*" "continue across exec that changes architecture"
}
-# Test that GDB updates the target description / arch successfuly
-# after the exec.
-gdb_test "continue" "Breakpoint 1, main.*" "continue across exec that changes architecture"
+foreach follow_exec_mode {"same" "new"} {
+ do_test $follow_exec_mode
+}