Testsuite: set sysroot when using gdbserver
authorAlan Hayward <alan.hayward@arm.com>
Thu, 28 Mar 2019 12:33:29 +0000 (12:33 +0000)
committerAlan Hayward <alan.hayward@arm.com>
Thu, 28 Mar 2019 15:00:30 +0000 (15:00 +0000)
When testing using native-gdbserver and native-extended-gdbserver, the sysroot
is not set.  This results in a warning from GDB and files are sent via the
remote protocol, which can be slow.

On Ubuntu 18.04 (unlike most distros) the debug versions of the standard
libraries are included by default in /usr/lib/debug/.

These file reads are causing a complete native-gdbserver run on the AArch64
buildbot slave to timeout after 2.5 hours.  This is also causing the builds
to back up on the slave.

The solution is to ensure the sysroot is set to / for all local boards.

This drastically reduces the time of a test. For example, gdb.base/sigall.exp
drops from 23 seconds to 4 seconds.
A full native-gdbserver run on the AArch64 slave now takes 8 minutes.

gdb/testsuite/ChangeLog:

* boards/local-board.exp: set sysroot to /.

gdb/testsuite/ChangeLog
gdb/testsuite/boards/local-board.exp

index 3de21c53e4e4c07b5950eb443fc31df36d67cb4b..ba97fc392570e4889bb2f2ec93680b8ee3d510f9 100644 (file)
@@ -1,3 +1,8 @@
+2019-03-28  Alan Hayward  <alan.hayward@arm.com>
+           Pedro Alves  <palves@redhat.com>
+
+       * boards/local-board.exp: set sysroot to /.
+
 2019-03-27  Alan Hayward  <alan.hayward@arm.com>
 
        * gdb.base/interrupt-daemon-attach.c (main): Add alarm and sleep
index 4150f1d1d659b50190b40556c12429b848a90b01..bf710f463286c8f11946d1206fa1d54d40af4c52 100644 (file)
@@ -22,3 +22,6 @@ global board_info
 # Remove any target variant specifications from the name.
 set baseboard [lindex [split $board "/"] 0]
 set board_info($baseboard,isremote) 0
+
+# Set sysroot to avoid sending files via the remote protocol.
+set GDBFLAGS "${GDBFLAGS} -ex \"set sysroot /\""
This page took 0.030648 seconds and 4 git commands to generate.