]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: Prepare for DejaGnu 1.6.2
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 7 Mar 2019 13:20:37 +0000 (13:20 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 12 Mar 2019 19:50:43 +0000 (19:50 +0000)
Changes in DejaGnu 1.6.2 mean that our testsuite will no longer run.
This is because of some confusion over how the gdb.exp file is
handled.

The gdb.exp file is really the tool init file, which is loaded from
within the DejaGnu core, and it should not be loaded directly from any
other file in the testsuite.

DejaGnu tries to prevent the same library being loaded twice by
remembering the names of library files as they are loaded.  Until
recently loading the tool init file in DejaGnu was very similar to
loading a library file, as a result, loading the gdb.exp tool init
file simply recorded 'gdb.exp' as having been loaded, future attempts
to load 'gdb.exp' as a library would then be ignored (as the file was
marked as already loaded).

DejaGnu has now changed so that it supports having both a tool init
file and a library with the same name, something that was not possible
before.  What this means however is that when the core loads the
'gdb.exp' tool init file it no longer marks the library 'gdb.exp' as
having been loaded.  When we then execute 'load_lib gdb.exp' we then
try to reload the 'gdb.exp' file.

Unfortunately our gdb.exp file can only be loaded once.  It use of
'rename cd builtin_cd' means that a second attempt to load this file
will fail.

This was discussed on the DejaGnu list here:
   http://lists.gnu.org/archive/html/dejagnu/2019-03/msg00000.html

and the suggested advice is that, unless we have some real requirement
to load the tool init file twice, we should remove calls to 'load_lib
gdb.exp' and rely on DejaGnu to load the file for us, which is what
this patch does.

I've tested with native X86-64/GNU Linux and see no regressions.

gdb/testsuite/ChangeLog:

* config/default.exp: Remove 'load_lib gdb.exp'.
* config/monitor.exp: Likewise.
* config/sid.exp: Likewise.
* config/sim.exp: Likewise.
* config/slite.exp: Likewise.
* config/unix.exp: Likewise.
* gdb.base/default.exp: Remove unhelpful comment.

gdb/testsuite/ChangeLog
gdb/testsuite/config/default.exp
gdb/testsuite/config/monitor.exp
gdb/testsuite/config/sid.exp
gdb/testsuite/config/sim.exp
gdb/testsuite/config/slite.exp
gdb/testsuite/config/unix.exp
gdb/testsuite/gdb.base/default.exp

index 57f80b49b59c7caed79af50b8861c72d9cf22340..15fbbe1b47b1320806e464f61baa09025047af43 100644 (file)
@@ -1,3 +1,13 @@
+2019-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * config/default.exp: Remove 'load_lib gdb.exp'.
+       * config/monitor.exp: Likewise.
+       * config/sid.exp: Likewise.
+       * config/sim.exp: Likewise.
+       * config/slite.exp: Likewise.
+       * config/unix.exp: Likewise.
+       * gdb.base/default.exp: Remove unhelpful comment.
+
 2019-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * gdb.fortran/type-kinds.exp: Extend to cover TYPE*SIZE cases.
index 8b70ee4b5073be65cbf505a78ae1dd86afb7cd48..325a58851ec6e6bc288b9e5543475d92c4ebe28d 100644 (file)
@@ -13,4 +13,4 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-load_lib gdb.exp
+# Nothing extra is needed here.
index be8d8429b8d133ae26979255cab6ffa586c586ce..48a01feb7061516d493ad5a97bd18ac8b663f8c6 100644 (file)
@@ -14,9 +14,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-load_lib gdb.exp
-# puts "***** DID USE MONITOR ******"
-
 #
 # gdb_target_cmd
 # Send gdb the "target" command
index 3c92a4fe9f536748a19badda1fdf75a30db48249..17a3ad568d9ee8382ec0b2adb91280a911455932 100644 (file)
@@ -14,8 +14,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-load_lib gdb.exp
-
 proc sid_start {} {
     global verbose
 
index dafb1a260630b58393663d64b8aba3852fb5b9fe..8d87e3089b04bb3cdca20b6cebf0082fa5fbc70b 100644 (file)
@@ -14,8 +14,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-load_lib gdb.exp
-
 #
 # gdb_target_sim
 # Set gdb to target the simulator
index 0fa472ee0cb8553568aec2f224f1dde030caf355..ffbd9c811e83167d615868e8d5f8829880db93ae 100644 (file)
@@ -27,7 +27,7 @@
 # rather than being displayed by gdb.
 
 load_lib remote.exp
-load_lib gdb.exp
+
 set gdb_prompt "\\(gdb\\)"
 
 #
index 2ab1d9abf0c8ba8723e595ca4e6c07896d32b10c..770e69b4c3246578aced9863d5ab1daf88b9d96c 100644 (file)
@@ -21,5 +21,3 @@
 # does not seem to be enough.  Try starting with 60.
 set timeout 60
 verbose "Timeout is now $timeout seconds" 2
-
-load_lib gdb.exp
index 8a11401c79fc97fa8900c07d1164c161f978f558..ece1428e617e20bec668a284330490e19a4d4767 100644 (file)
@@ -25,8 +25,6 @@ set timeout 60
 # test default actions of gdb commands
 #
 
-#load_lib gdb.exp
-
 gdb_test "add-symbol-file" "add-symbol-file takes a file name and an address" "add-symbol-file"
 
 # test append