Move strace -m/explicit location test to strace.exp
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.trace / infotrace.exp
index 49b77be966cfd7b4c8cb82220c4869470aa89dcb..3b861ead5b281f9ba694b4a1fece7846cf000827 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 1998-2013 Free Software Foundation, Inc.
+#   Copyright 1998-2015 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
@@ -15,7 +15,7 @@
 
 # This file was written by Michael Snyder (msnyder@cygnus.com)
 
-load_lib "trace-support.exp";
+load_lib "trace-support.exp"
 
 
 gdb_exit
@@ -39,11 +39,11 @@ gdb_file_cmd $binfile
 #
 
 gdb_delete_tracepoints
-set c_test_num [gdb_gettpnum gdb_c_test];
-set asm_test_num [gdb_gettpnum gdb_asm_test];
+set c_test_num [gdb_gettpnum gdb_c_test]
+set asm_test_num [gdb_gettpnum gdb_asm_test]
 if { $c_test_num <= 0 || $asm_test_num <= 0 } then {
     fail "setting tracepoints"
-    return;
+    return
 }
 
 # 2.1 info tracepoints (all)
@@ -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"
This page took 0.024079 seconds and 4 git commands to generate.