diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 723bfd1137..94e1b5eed6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-04-07 Pedro Alves + + * gdb.trace/actions.exp: Use gdb_breakpoint instead of gdb_test + that doesn't expect anything. Return early if running to main + fails. + 2015-04-07 Yao Qi * gdb.threads/non-stop-fair-events.c (SECONDS): New macro. diff --git a/gdb/testsuite/gdb.trace/actions.exp b/gdb/testsuite/gdb.trace/actions.exp index 52462821a5..913a2ec7cb 100644 --- a/gdb/testsuite/gdb.trace/actions.exp +++ b/gdb/testsuite/gdb.trace/actions.exp @@ -235,9 +235,15 @@ gdb_test "info tracepoints" \ \[\t \]+not installed on target." \ "5.10a: verify teval actions set for two tracepoints" -gdb_test "break main" +# Can't use runto_main here, because that would delete the tracepoints +# created above. +gdb_breakpoint "main" gdb_run_cmd -gdb_test "" "Breakpoint .*" +if {[gdb_test "" "Breakpoint .*"] != 0} { + fail "Can't run to main" + return -1 +} + if ![gdb_target_supports_trace] { unsupported "target does not support trace" return -1