From 343c2cbd8577101a8057d1459810ff983d07943c Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 11 Oct 2022 18:11:52 +0200 Subject: [PATCH] [gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with native-gdbserver When running test-case gdb.debuginfod/fetch_src_and_symbols.exp with target board native-gdbserver, I get: ... Running gdb.debuginfod/fetch_src_and_symbols.exp ... ERROR: tcl error sourcing gdb.debuginfod/fetch_src_and_symbols.exp. ERROR: gdbserver does not support start without extended-remote while executing "error "gdbserver does not support $command without extended-remote"" (procedure "gdb_test_multiple" line 51) invoked from within "gdb_test_multiple $command $message {*}$opts $user_code" (procedure "gdb_test" line 56) invoked from within "gdb_test "start" "Temporary breakpoint.*"" ... Fix this by replacing gdb_test "start" with runto_main. Tested on x86_64-linux. --- gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.30.2