gdb: remove uses of iterate_over_inferiors in mi/mi-main.c
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.trace / passc-dyn.exp
index 1ec120e11f91836fac3d6a4c5015d6015a9fde2a..36a95101d53ae4c43987ee66dc97f052e783d5af 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 1998, 2005, 2007-2012 Free Software Foundation, Inc.
+#   Copyright 1998-2020 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
 
 # This file was written by Michael Snyder (msnyder@cygnus.com)
 
-load_lib "trace-support.exp";
+load_lib "trace-support.exp"
 
 
 gdb_exit
 gdb_start
-set testfile "actions"
-set srcfile ${testfile}.c
-set binfile $objdir/$subdir/passc-dyn
+standard_testfile actions.c
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
-    untested passc-dyn.exp
+    untested "failed to compile"
     return -1
 }
 gdb_load $binfile
@@ -34,11 +36,9 @@ gdb_test "tfind none"  ".*" ""
 runto_main
 gdb_reinitialize_dir $srcdir/$subdir
 
-# We generously give ourselves one "pass" if we successfully 
-# detect that this test cannot be run on this target!
 if { ![gdb_target_supports_trace] } then {
-    pass "Current target does not support trace"
-    return 1;
+    unsupported "current target does not support trace"
+    return 1
 
 }
 
@@ -50,11 +50,11 @@ if { ![gdb_target_supports_trace] } then {
 # test passcount dynamically (live target)
 #
 
-set baseline [gdb_find_recursion_test_baseline $srcfile];
+set baseline [gdb_find_recursion_test_baseline $srcfile]
 
 if { $baseline == -1 } then {
-    fail "Could not find gdb_recursion_test function"
-    return;
+    fail "could not find gdb_recursion_test function"
+    return
 }
 
 # define relative source line numbers:
@@ -78,7 +78,7 @@ set tdp3 [gdb_gettpnum "$testline3"]
 set tdp4 [gdb_gettpnum "$testline4"]
 if { $tdp2 <= 0 || $tdp3 <= 0 || $tdp4 <= 0 } then {
     fail "setting tracepoints"
-    return;
+    return
 }
 
 gdb_test "passcount 4 $tdp2" "Setting tracepoint $tdp2's passcount to 4" \
@@ -90,7 +90,7 @@ gdb_test "passcount 3 $tdp4" "Setting tracepoint $tdp4's passcount to 3" \
 
 gdb_test "tstart" ".*" ""
 
-gdb_test "break end" ".*" ""
+gdb_breakpoint "end" qualified
 gdb_test "continue" \
     "Continuing.*Breakpoint $decimal, end.*" \
     "run trace experiment"
@@ -98,37 +98,37 @@ gdb_test "tstop" ".*" ""
 
 gdb_test "tfind none" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x -1 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
 gdb_test "tfind tracepoint $tdp2" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 0 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
 gdb_test "tfind tracepoint $tdp3" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 1 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
 gdb_test "tfind tracepoint $tdp4" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 2 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
 gdb_test "tfind tracepoint $tdp2" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 3 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
 gdb_test "tfind tracepoint $tdp3" ".*" ""
 if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 4 x" ""] {
-    untested passc-dyn.exp
+    untested "skipping further tests due to print failure"
     return -1
 }
 
This page took 0.026963 seconds and 4 git commands to generate.