Skip to content

Commit

Permalink
[gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with nat…
Browse files Browse the repository at this point in the history
…ive-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.
  • Loading branch information
vries committed Oct 11, 2022
1 parent 1250943 commit 343c2cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 343c2cb

Please sign in to comment.