aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.threads/non-ldr-exc-3.exp')
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exc-3.exp61
1 files changed, 30 insertions, 31 deletions
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
index c4de2e7..50350e9 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
@@ -27,44 +27,43 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
}
proc do_test { lock_sched nonstop } {
- with_test_prefix "lock-sched=$lock_sched,non-stop=$nonstop" {
- global executable
+ global executable
- save_vars { GDBFLAGS } {
- append GDBFLAGS " -ex \"set non-stop $nonstop\""
- clean_restart ${executable}
- }
-
- if ![runto_main] {
- return -1
- }
+ save_vars { GDBFLAGS } {
+ append GDBFLAGS " -ex \"set non-stop $nonstop\""
+ clean_restart ${executable}
+ }
- gdb_breakpoint [gdb_get_line_number "break-here"]
- gdb_continue_to_breakpoint "break-here" ".* break-here .*"
+ if ![runto_main] {
+ return -1
+ }
- # Also test with sched-lock to make sure we can follow the
- # non-leader thread execing even though the main thread wasn't
- # resumed before the exec.
- if { $lock_sched } {
- gdb_test_no_output "set scheduler-locking on"
- }
+ gdb_breakpoint [gdb_get_line_number "break-here"]
+ gdb_continue_to_breakpoint "break-here" ".* break-here .*"
- if { $nonstop == "on" } {
- gdb_test "thread 2" "Switching.*"
- }
+ # Also test with sched-lock to make sure we can follow the
+ # non-leader thread execing even though the main thread wasn't
+ # resumed before the exec.
+ if { $lock_sched } {
+ gdb_test_no_output "set scheduler-locking on"
+ }
- gdb_test "continue" \
- ".*is executing new program.*Breakpoint 1, main.* at .*" \
- "continue over exec"
+ if { $nonstop == "on" } {
+ gdb_test "thread 2" "Switching.*"
}
+
+ gdb_test "continue" \
+ ".*is executing new program.*Breakpoint 1, main.* at .*" \
+ "continue over exec"
}
-foreach nonstop {"on" "off"} {
- foreach schedlock {"on" "off"} {
- if {$schedlock == "on" && $nonstop == "on"} {
- # Schedule locking has no effect in nonstop mode.
- continue
+foreach_with_prefix nonstop {"on" "off"} {
+ foreach_with_prefix schedlock {"on" "off"} {
+ if {$schedlock == "on" && $nonstop == "on"} {
+ # Schedule locking has no effect in nonstop mode.
+ continue
+ }
+
+ do_test $schedlock $nonstop
}
- do_test $schedlock $nonstop
- }
}