Fix '--target_board=native-extended-gdbserver/-m32'
authorPedro Alves <palves@redhat.com>
Wed, 4 Feb 2015 13:53:24 +0000 (14:53 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 4 Feb 2015 13:53:24 +0000 (14:53 +0100)
Running the testsuite with the native-extended-gdbserver.exp board and
passing a variant spec, like

  make check RUNTESTFLAGS="--target_board=native-extended-gdbserver/-m32"

results in dejagnu trying to open a rsh connection to
"native-extended-gdbserver", which of course is wrong.  The point of
this board is running things locally.

The issue is that the native-extended-gdbserver board does not clear
the "isremote" flag properly.

Reported by Sergio at:
  https://sourceware.org/ml/gdb-patches/2015-02/msg00067.html

testsuite/
2015-02-04  Pedro Alves  <palves@redhat.com>

* boards/native-extended-gdbserver.exp: Remove any target variant
specifications from the board name before clearing the isremote
flag from board_info.

gdb/testsuite/ChangeLog
gdb/testsuite/boards/native-extended-gdbserver.exp

index 26579871164a41ba66febedf8bc5601b821893b1..fcc16cb15b8fa183e54a0ea3def793ed02d9d34e 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-04  Pedro Alves  <palves@redhat.com>
+
+       * boards/native-extended-gdbserver.exp: Remove any target variant
+       specifications from the board name before clearing the isremote
+       flag from board_info.
+
 2015-01-31  Doug Evans  <xdje42@gmail.com>
 
        * gdb.base/maint.exp <maint print type argc>: Update expected output.
index 57503db86bdc20e6a5f04134f9db8e3f491dd366..8d299ef3f639672cefa28b4e84cdc1f39eb51ed8 100644 (file)
@@ -27,7 +27,9 @@ load_board_description "gdbserver-base"
 # matches localhost.  Force it to be NOT remote.
 global board
 global board_info
-set board_info($board,isremote) 0
+# Remove any target variant specifications from the name.
+set baseboard [lindex [split $board "/"] 0]
+set board_info($baseboard,isremote) 0
 
 set_board_info sockethost "localhost:"