diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-02-10 18:01:10 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-02-10 18:01:10 -0500 |
commit | 25ad1e83c8949c83d6aa6fba7fb27134d105debe (patch) | |
tree | 8ae942d48445667f2254d39b9595f043e4e8208c /gdb/testsuite | |
parent | 18b8df43bd11ed314153dff2ef04a4b991f00a7c (diff) | |
download | fsf-binutils-gdb-25ad1e83c8949c83d6aa6fba7fb27134d105debe.zip fsf-binutils-gdb-25ad1e83c8949c83d6aa6fba7fb27134d105debe.tar.gz fsf-binutils-gdb-25ad1e83c8949c83d6aa6fba7fb27134d105debe.tar.bz2 |
gdb/testsuite: use "set sysroot" in gdb.multi/multi-target.exp.tcl
The multi-target tests involve some inferiors using remote targets. By
default, GDB uses target: as the sysroot, which makes it read loaded
libraries and their debug info through GDBserver. This makes the tests
run slower than necessary.
Pass `-ex "set sysroot"` when launching GDB in these tests, so that GDB
always reads from its local file system.
On a system where I don't have debug info for libc, that reduces run
time for
$ make check TESTS="gdb.multi/multi-target-*.exp"
from 1:15 to 0:45.
On this other system where debug info is installed though, it reduces it
from 13:00 to 1:45.
gdb/testsuite/ChangeLog:
* gdb.multi/multi-target.exp.tcl (setup): Add "set sysroot" to
GDBFLAGS.
Change-Id: I9d24f3def843472d35dfb5667c12d70ae1d7e984
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.multi/multi-target.exp.tcl | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6d10953..43758c9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2021-02-10 Simon Marchi <simon.marchi@efficios.com> + + * gdb.multi/multi-target.exp.tcl (setup): Add "set sysroot" to + GDBFLAGS. + 2021-02-10 Andrew Burgess <andrew.burgess@embecosm.com> * gdb.fortran/lbound-ubound.F90: New file. diff --git a/gdb/testsuite/gdb.multi/multi-target.exp.tcl b/gdb/testsuite/gdb.multi/multi-target.exp.tcl index 53727bb..6f3051c 100644 --- a/gdb/testsuite/gdb.multi/multi-target.exp.tcl +++ b/gdb/testsuite/gdb.multi/multi-target.exp.tcl @@ -109,7 +109,13 @@ proc setup {non-stop} { global binfile cleanup_gdbservers - clean_restart ${binfile} + + save_vars { ::GDBFLAGS } { + # Make GDB read files from the local file system, not through the + # remote targets. + set ::GDBFLAGS "${::GDBFLAGS} -ex \"set sysroot\"" + clean_restart ${binfile} + } # multi-target depends on target running in non-stop mode. Force # it on for remote targets, until this is the default. |