diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp index d781d7a53c7..8bb9203686d 100644 --- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp +++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp @@ -158,7 +158,9 @@ proc_with_prefix no_url { } { # Generate a core file and test that GDB cannot find the # executable. clean_restart ${binfile}2 - gdb_test "start" "Temporary breakpoint.*" + if ![runto_main] { + return -1 + } gdb_test "generate-core-file $::corefile" "Saved corefile $::corefile" \ "file [file tail $::corefile] gen" file rename -force ${binfile}2 $debugdir