summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/infotrace.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.trace/infotrace.exp')
-rw-r--r--gdb/testsuite/gdb.trace/infotrace.exp11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.trace/infotrace.exp b/gdb/testsuite/gdb.trace/infotrace.exp
index 4e96ea288cb..3b861ead5b2 100644
--- a/gdb/testsuite/gdb.trace/infotrace.exp
+++ b/gdb/testsuite/gdb.trace/infotrace.exp
@@ -91,11 +91,20 @@ gdb_test "help info tracepoints" \
# 2.6 info tracepoints (check trace buffer usage). We need a live
# tracing.
+
+# Load the binary to the target too.
+gdb_load $binfile
+
+# Can't use runto_main here, because that would delete the tracepoints
+# created above.
gdb_breakpoint "main"
gdb_trace_setactions "collect on tracepoint 1" "1" \
"collect gdb_struct1_test" "^$"
gdb_run_cmd
-gdb_test "" "Breakpoint ${decimal}, main.*"
+if {[gdb_test "" "Breakpoint ${decimal}, main.*"] != 0} {
+ fail "Can't run to main"
+ return -1
+}
if { ![gdb_target_supports_trace] } then {
unsupported "Current target does not support trace"