-# Copyright 1998-2014 Free Software Foundation, Inc.
+# Copyright 1998-2023 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
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
standard_testfile actions.c
+require gdb_trace_common_supports_arch
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } {
- untested tracecmd.exp
+ untested "failed to compile"
return -1
}
-gdb_reinitialize_dir $srcdir/$subdir
-
-# If testing on a remote host, download the source file.
-# remote_download host $srcdir/$subdir/$srcfile
+clean_restart
gdb_file_cmd $binfile
# define relative source line numbers:
# all subsequent line numbers are relative to this first one (baseline)
set baseline [gdb_find_recursion_test_baseline $srcfile]
-if { $baseline == -1 } then {
- fail "Could not find gdb_recursion_test function"
+if {$baseline == -1} {
+ fail "could not find gdb_recursion_test function"
return
}
set helpcnt 0
test_class_help "tracepoints" {
"Tracing of program execution without stopping the program\.[\r\n\]+"
-} "1.0: help tracepoints"
+} {} "1.0: help tracepoints"
#
# test trace command:
"Tracepoint $decimal at $hex: file.*$srcfile, line $testline2." \
"1.1a: set tracepoint at sourceline"
gdb_test "info trace" "in gdb_recursion_test.*$srcfile:$testline2.
-\[\t \]+not installed on target." \
+\[\t \]+not installed on target" \
"1.1b: trace sourcefile:line"
# 1.2 trace invalid source line
"Tracepoint $decimal at $hex: file.*$srcfile, line $testline1." \
"1.4a: trace function by name"
gdb_test "info trace" "in gdb_recursion_test.*$srcfile:$testline1.
-\[\t \]+not installed on target." \
+\[\t \]+not installed on target" \
"1.4b: trace function by name"
# 1.5 trace non-existant function
"Tracepoint $decimal at .*$c_test_addr.*" \
"1.7a: trace at function label (before prologue)"
gdb_test "info trace" "$c_test_addr.*in gdb_recursion_test.*:$baseline.
-\[\t \]+not installed on target." \
+\[\t \]+not installed on target" \
"1.7b: verify trace at specific address"
# 1.8 trace at invalid address
"1.11a: conditional tracepoint"
gdb_test "info trace" "in gdb_recursion_test.*$srcfile:$testline1.
\[\t \]+trace only if q1 > 0.
-\[\t \]+not installed on target." \
+\[\t \]+not installed on target" \
"1.11b: verify conditional tracepoint"
# 1.12 set tracepoint in prologue
gdb_delete_tracepoints
# Acceptance vs rejection of a location are target-specific, so allow both.
-gdb_test_multiple "ftrace gdb_recursion_test" "Set a fast tracepoint" {
+gdb_test_multiple "ftrace gdb_recursion_test" "set a fast tracepoint" {
-re "Fast tracepoint $decimal at $hex: file.*$srcfile, line $testline1.*$gdb_prompt $" {
- pass "Set a fast tracepoint"
+ pass "set a fast tracepoint"
}
-re ".*May not have a fast tracepoint at $hex.*$gdb_prompt $" {
- pass "Declined to set a fast tracepoint"
+ pass "declined to set a fast tracepoint"
}
}