diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0bd3d1cb8ff..d51b60c09c5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2021-06-06 Simon Marchi + + * gdb.server/stop-reply-no-thread-multi.exp: Clear sysroot when + host and target are local. + 2021-06-05 Hannes Domani * gdb.python/py-symbol.exp: Fix tests for Python 3. diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp index 50cf10fe313..b3ded0e5ab5 100644 --- a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp +++ b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp @@ -48,6 +48,13 @@ proc run_test { target_non_stop disable_feature } { save_vars { GDBFLAGS } { append GDBFLAGS " -ex \"maint set target-non-stop $target_non_stop\"" + + # If GDB and GDBserver are both running locally, set the sysroot to avoid + # reading files via the remote protocol. + if { ![is_remote host] && ![is_remote target] } { + set GDBFLAGS "$GDBFLAGS -ex \"set sysroot\"" + } + clean_restart ${binfile} }