-# Copyright 2011-2016 Free Software Foundation, Inc.
+# Copyright 2011-2018 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
# the Free Software Foundation; either version 3 of the License, or
# Some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags]
-if [prepare_for_testing $expfile $executable $srcfile \
+if [prepare_for_testing "failed to prepare" $executable $srcfile \
[list debug $additional_flags]] {
- untested "failed to prepare for trace tests"
return -1
}
if ![runto_main] {
- fail "Can't run to main to check for trace support"
+ fail "can't run to main to check for trace support"
return -1
}
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
- fail "Can't run to main"
+ fail "can't run to main"
return -1
}
gdb_test_no_output "set breakpoint always-inserted ${option}"
- gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+ gdb_breakpoint "end" qualified
- gdb_test "break set_point" "Breakpoint \[0-9\] at $hex: file.*"
+ gdb_breakpoint "set_point" qualified
gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
gdb_test_no_output "tstart"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to set_point"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to set_point"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to end"
gdb_test_no_output "tstop"
gdb_test "tfind" "Found trace frame 0, tracepoint .*" "tfind frame 0"
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
- fail "Can't run to main"
+ fail "can't run to main"
return -1
}
gdb_test_no_output "set breakpoint always-inserted ${option}"
- gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+ gdb_breakpoint "end" qualified
gdb_test "${trace_type1} set_point" \
"\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
"${trace_type2} set_point (2)"
gdb_test_no_output "tstart"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to end"
gdb_test_no_output "tstop"
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
- fail "Can't run to main"
+ fail "can't run to main"
return -1
}
gdb_test_no_output "set breakpoint always-inserted ${option}"
- gdb_test "break marker" "Breakpoint \[0-9\] at $hex: file.*"
- gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+ gdb_breakpoint "marker" qualified
+ gdb_breakpoint "end" qualified
- gdb_test "break set_point" "Breakpoint \[0-9\] at $hex: file.*"
+ gdb_breakpoint "set_point" qualified
gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
gdb_test_no_output "tstart"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to marker"
gdb_test "delete break 4"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to end"
gdb_test_no_output "tstop"
gdb_test "tfind" "Found trace frame 0, tracepoint .*" "tfind frame 0"
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
- fail "Can't run to main"
+ fail "can't run to main"
return -1
}
gdb_test_no_output "set breakpoint always-inserted ${option}"
- gdb_test "break marker" "Breakpoint \[0-9\] at $hex: file.*"
- gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+ gdb_breakpoint "marker" qualified
+ gdb_breakpoint "end" qualified
- gdb_test "break set_point" "Breakpoint \[0-9\] at $hex: file.*"
+ gdb_breakpoint "set_point" qualified
gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to marker"
# Delete tracepoint set on set_point.
gdb_test "delete trace 5"
gdb_test "tstart" "No tracepoints defined, not starting trace.*"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to set_point"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to set_point"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to end"
gdb_test "tstop" "Trace is not running.*"
gdb_test "tfind" "Target failed to find requested trace frame\\..*"
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
- fail "Can't run to main"
+ fail "can't run to main"
return -1
}
- gdb_test "break marker" "Breakpoint \[0-9\] at $hex: file.*"
- gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+ gdb_breakpoint "marker" qualified
+ gdb_breakpoint "end" qualified
gdb_test "${trace1} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
"${trace1} set_point 1"
gdb_test_no_output "tstart"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to marker"
if [string equal $trace3_at_first_loc "1"] {
gdb_test "${trace3} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
gdb_trace_setactions "set action for tracepoint 3" "" \
"collect \$$fpreg" "^$"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to end"
gdb_test_no_output "tstop"
gdb_test "tfind tracepoint 4" "Found trace frame \[0-9\], tracepoint .*" \
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
- fail "Can't run to main"
+ fail "can't run to main"
return -1
}
- gdb_test "break marker" "Breakpoint \[0-9\] at $hex: file.*"
- gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+ gdb_breakpoint "marker" qualified
+ gdb_breakpoint "end" qualified
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to marker"
gdb_test "${trace1} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
"${trace1} set_point 1"
gdb_test_no_output "$enable2 5"
gdb_test_no_output "tstart"
- gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+ gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+ "continue to end"
gdb_test_no_output "tstop"
break_trace_same_addr_6 "trace" "disable" "trace" "enable"
set libipa [get_in_proc_agent]
-gdb_load_shlibs $libipa
+set remote_libipa [gdb_load_shlib $libipa]
# Can't use prepare_for_testing, because that splits compiling into
# building objects and then linking, and we'd fail with "linker input
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable [list debug $additional_flags shlib=$libipa] ] != "" } {
- untested "failed to compile ftrace tests"
+ untested "failed to compile"
return -1
}
clean_restart ${executable}
if ![runto_main] {
- fail "Can't run to main for ftrace tests"
+ fail "can't run to main for ftrace tests"
return 0
}
gdb_reinitialize_dir $srcdir/$subdir
-if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } {
- untested "Could not find IPA lib loaded"
+if { [gdb_test "info sharedlibrary" ".*${remote_libipa}.*" "IPA loaded"] != 0 } {
+ untested "could not find IPA lib loaded"
} else {
foreach break_always_inserted { "on" "off" } {
break_trace_same_addr_1 "ftrace" ${break_always_inserted}