-# 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
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
}
# 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:
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" \
gdb_test "tstart" ".*" ""
-gdb_test "break end" ".*" ""
+gdb_breakpoint "end" qualified
gdb_test "continue" \
"Continuing.*Breakpoint $decimal, end.*" \
"run trace experiment"
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
}