[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.
This commit is contained in:
Tom de Vries 2019-09-19 01:14:19 +02:00
parent 81dc3ab594
commit 8a6251301c
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -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]
}