diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-08-23 14:24:03 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-08-23 14:24:03 +0100 |
commit | e9d9abd7470ea500eb4e82567fff68e87a30efb9 (patch) | |
tree | b8077f96df3f982fcd91c427adcf21fbb58c2d7d /gdb | |
parent | 3589529e3cec4a5a72cd161959055d1e48dcf129 (diff) | |
download | gdb-e9d9abd7470ea500eb4e82567fff68e87a30efb9.zip gdb-e9d9abd7470ea500eb4e82567fff68e87a30efb9.tar.gz gdb-e9d9abd7470ea500eb4e82567fff68e87a30efb9.tar.bz2 |
gdbserver_spawn "" rather than gdbserver_spawn ${binfile}
Hi,
I happen to see gdbserver is spawned like this in gdb.log,
spawn /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/../../gdb/gdbserver/gdbserver --once :2346 /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/outputs/gdb.s
erver/connect-stopped-target/connect-stopped-target /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/outputs/gdb.server/connect-stopped-target/connect-stopped-t
arget
spawn /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/../../gdb/gdbserver/gdbserver --once :2347 /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/outputs/gdb.s
erver/connect-stopped-target/connect-stopped-target /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/outputs/gdb.server/connect-stopped-target/connect-stopped-t
arget
as we can see, there are two instances of connect-stopped-target or
connect-stopped-target in the command line spawning gdbserver, but
none of these gets parameters from command line. In these two
tests, gdbserver is spawned via "gdbserver_spawn ${binfile}". However,
the argument of gdbserver_spawn is the argument passed the child
inferior, not the program itself.
# Start a gdbserver process running SERVER_EXEC, and connect GDB
# to it. CHILD_ARGS are passed to the inferior.
#
# Returns the target protocol and socket to connect to.
proc gdbserver_spawn { child_args } {
set target_exec [gdbserver_download_current_prog]
GDBserver gets the program via last_loaded_file, which is set by
gdb_file_cmd. In each test, we don't need to pass ${binfile}.
gdb/testsuite:
2016-08-23 Yao Qi <yao.qi@linaro.org>
* gdb.server/connect-stopped-target.exp (do_test): Pass "" to
gdbserver_spawn.
* gdb.server/connect-without-multi-process.exp (do_test):
Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.server/connect-stopped-target.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.server/connect-without-multi-process.exp | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 76f57e1..4fd5344 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2016-08-23 Yao Qi <yao.qi@linaro.org> + * gdb.server/connect-stopped-target.exp (do_test): Pass "" to + gdbserver_spawn. + * gdb.server/connect-without-multi-process.exp (do_test): + Likewise. + +2016-08-23 Yao Qi <yao.qi@linaro.org> + * gdb.base/signals-state-child.exp: Set variables gdb_txt and standalone_txt. Delete gdb_txt and standalone_txt on host and target. Spawn the binary on target. Copy files from diff --git a/gdb/testsuite/gdb.server/connect-stopped-target.exp b/gdb/testsuite/gdb.server/connect-stopped-target.exp index b083d89..9e445b0 100644 --- a/gdb/testsuite/gdb.server/connect-stopped-target.exp +++ b/gdb/testsuite/gdb.server/connect-stopped-target.exp @@ -44,7 +44,7 @@ proc do_test {nonstop} { gdb_test "set non-stop $nonstop" - set res [gdbserver_spawn ${binfile}] + set res [gdbserver_spawn ""] set gdbserver_protocol [lindex $res 0] set gdbserver_gdbport [lindex $res 1] diff --git a/gdb/testsuite/gdb.server/connect-without-multi-process.exp b/gdb/testsuite/gdb.server/connect-without-multi-process.exp index 79d7d72..2e9769b 100644 --- a/gdb/testsuite/gdb.server/connect-without-multi-process.exp +++ b/gdb/testsuite/gdb.server/connect-without-multi-process.exp @@ -41,7 +41,7 @@ proc do_test {multiprocess} { gdb_test_no_output "set remote multiprocess-feature $multiprocess" - set res [gdbserver_spawn ${binfile}] + set res [gdbserver_spawn ""] set gdbserver_protocol [lindex $res 0] set gdbserver_gdbport [lindex $res 1] |