aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-09-19 01:14:19 +0200
committerTom de Vries <tdevries@suse.de>2019-09-19 01:14:19 +0200
commit8a6251301c6ea6d804735fbad8cdb7cba707f784 (patch)
tree3e942d701b6fffb0c88a9cb4385a69fff84f89dd
parent81dc3ab59476c9851a6cda321b85dcf8a6ef4be8 (diff)
downloadgdb-8a6251301c6ea6d804735fbad8cdb7cba707f784.zip
gdb-8a6251301c6ea6d804735fbad8cdb7cba707f784.tar.gz
gdb-8a6251301c6ea6d804735fbad8cdb7cba707f784.tar.bz2
[gdb/testsuite] Fix gdb_target_cmd
In commit 81dc3ab594 "[gdb/testsuite] Handle unreachable network in server-connect.exp" a regression was introduced in gdb_target_cmd, causing ERRORs like this: ... ERROR: tcl error sourcing src/gdb/testsuite/gdb.server/abspath.exp. ERROR: wrong # args: should be "gdb_target_cmd {$args}" while executing "gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport" ... Fix the argument passing in gdb_target_cmd. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-09-19 Tom de Vries <tdevries@suse.de> * lib/gdbserver-support.exp (gdb_target_cmd): Fix argument passing.
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/lib/gdbserver-support.exp4
2 files changed, 6 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 2acc1f7..d5a5309 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2019-09-19 Tom de Vries <tdevries@suse.de>
+ * lib/gdbserver-support.exp (gdb_target_cmd): Fix argument passing.
+
+2019-09-19 Tom de Vries <tdevries@suse.de>
+
* lib/gdbserver-support.exp (gdb_target_cmd_ext): Return 2 (meaning
UNSUPPORTED) for 'Network is unreachable' message. Factor out of ...
(gdb_target_cmd): ... here.
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index 2ad53c1..00f46c8 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -112,8 +112,8 @@ proc gdb_target_cmd_ext { targetname serialport {additional_text ""} } {
# Like gdb_target_cmd_ext, but returns 0 on success, 1 on failure.
-proc gdb_target_cmd { $args } {
- set res [gdb_target_cmd_ext $args]
+proc gdb_target_cmd { args } {
+ set res [eval gdb_target_cmd_ext $args]
return [expr $res == 0 ? 0 : 1]
}