From ca3f91ed68bb4e5c364da0d210aa55dc52973ef0 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 4 May 2001 21:02:12 +0000 Subject: [PATCH] 2001-01-26 Felix Lee * sid.exp (sid_exit): Pass host, not target, to remote_close. 2001-01-25 matthew green * config/sid.exp (sid_start): Call `remote_push_conn' after firing up sid. (sid_exit): Call `remote_pop_conn' after GDB is gone. 2001-01-25 matthew green * config/sid.exp (sid_start): Use `remote_spawn' instead of `spawn.' Deprecate $sid_spawn_id. (sid_exit): Remove code necessary only for `spawn.' 2001-01-25 matthew green * config/sid.exp (sid_start): Handle sim,protocol of `sid.' --- gdb/testsuite/ChangeLog | 20 ++++++++++++++++++++ gdb/testsuite/config/sid.exp | 32 +++++++++++++++++++++----------- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 06676823171..a0c0248d773 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -228,6 +228,26 @@ Sun Feb 4 17:32:21 2001 Andrew Cagney * gdb.c++/templates.cc (printf): Remove unused function definition. +2001-01-26 Felix Lee + + * sid.exp (sid_exit): Pass host, not target, to remote_close. + +2001-01-25 matthew green + + * config/sid.exp (sid_start): Call `remote_push_conn' after firing + up sid. + (sid_exit): Call `remote_pop_conn' after GDB is gone. + +2001-01-25 matthew green + + * config/sid.exp (sid_start): Use `remote_spawn' instead of `spawn.' + Deprecate $sid_spawn_id. + (sid_exit): Remove code necessary only for `spawn.' + +2001-01-25 matthew green + + * config/sid.exp (sid_start): Handle sim,protocol of `sid.' + 2001-01-17 Ben Elliston * config/sid.exp: New file. diff --git a/gdb/testsuite/config/sid.exp b/gdb/testsuite/config/sid.exp index 60cb0c9b7e1..16b462085ba 100644 --- a/gdb/testsuite/config/sid.exp +++ b/gdb/testsuite/config/sid.exp @@ -18,7 +18,6 @@ load_lib gdb.exp proc sid_start {} { - global sid_spawn_id global verbose set port [lindex [split [target_info netport] ":"] 1] @@ -50,7 +49,11 @@ proc sid_start {} { set env(MKSID) "../../sid/main/static/mksid" if {! [file exists $env(SID)]} then { error "Cannot find sid in build tree" } } - set spawncmd "../../sid/bsp/[target_info sim] $sidverbose $sidendian --persistent --gdb=$port [target_info sim,options]" + if { [board_info target sim,protocol] == "sid" } { + set spawncmd "[target_info sim] [target_info sim,options] -e \"set gdb-socket sockaddr-local 0.0.0.0:$port\"" + } else { + set spawncmd "../../sid/bsp/[target_info sim] $sidverbose $sidendian --gdb=$port [target_info sim,options]" + } set post_spawn { global env unset env(SID_LIBRARY_PATH) @@ -58,13 +61,21 @@ proc sid_start {} { unset env(SID) } } else { + global find_rawsid; + set pre_spawn {} - set spawncmd "[target_info sim] $sidverbose $sidendian --persistent --gdb=$port [target_info sim,options]" + if { [board_info target sim,protocol] == "sid" } { + # FIXME: sim,options may be from the build tree, should find + # it in the install tree. + set spawncmd "sid [target_info sim,options] -e \"set gdb-socket sockaddr-local 0.0.0.0:$port\"" + } else { + set spawncmd "[target_info sim] $sidverbose $sidendian --gdb=$port [target_info sim,options]" + } set post_spawn {} } eval $pre_spawn - if {[catch "spawn $spawncmd" msg]} { + if {[catch [list remote_spawn host $spawncmd] msg]} { perror $msg exit 1 } @@ -81,7 +92,9 @@ proc sid_start {} { # GDB would wait for a fair while for the stub to respond. sleep 4 - set sid_spawn_id $spawn_id + if ![target_info exists gdb,no_push_conn] { + remote_push_conn host; + } } # @@ -94,12 +107,9 @@ proc gdb_start {} { } proc sid_exit {} { - global sid_spawn_id - if {[info exists sid_spawn_id]} { - catch {exec kill [exp_pid -i $sid_spawn_id]} - catch {wait -i $sid_spawn_id} - unset sid_spawn_id - sleep 4 + if ![target_info exists gdb,no_push_conn] { + remote_close host; + remote_pop_conn host; } } -- 2.30.2