Testsuite: Fix ambiguous "break" due to libinproctrace
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.trace / trace-break.exp
index afa8430c767290c340557bf602554bf37056937b..84c4780ba2a71d22008850a3987fb6aacaad7080 100644 (file)
@@ -1,4 +1,4 @@
-# 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
@@ -21,14 +21,13 @@ set expfile $testfile.exp
 # 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
 }
 
@@ -48,15 +47,15 @@ proc break_trace_same_addr_1 { trace_type option } \
     # 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"
@@ -83,13 +82,13 @@ proc break_trace_same_addr_2 { trace_type1 trace_type2 option } \
     # 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.*" \
@@ -122,15 +121,15 @@ proc break_trace_same_addr_3 { trace_type option } \
     # 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"
@@ -160,15 +159,15 @@ proc break_trace_same_addr_4 { trace_type option } \
     # 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\]+(Thread .* hit )?Breakpoint.*" \
@@ -204,12 +203,12 @@ proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \
     # 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"
@@ -278,12 +277,12 @@ proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } \
     # 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\]+(Thread .* hit )?Breakpoint.*" \
        "continue to marker"
@@ -349,7 +348,7 @@ break_trace_same_addr_6 "trace" "enable" "trace" "disable"
 break_trace_same_addr_6 "trace" "disable" "trace" "enable"
 
 set libipa [get_in_proc_agent]
-gdb_load_shlib $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
@@ -357,19 +356,19 @@ gdb_load_shlib $libipa
 
 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}
This page took 0.027569 seconds and 4 git commands to generate.