2001-01-26 Felix Lee <flee@redhat.com>

* sid.exp (sid_exit): Pass host, not target, to remote_close.

2001-01-25  matthew green  <mrg@redhat.com>

	* 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  <mrg@redhat.com>

	* 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  <mrg@redhat.com>

	* config/sid.exp (sid_start): Handle sim,protocol of `sid.'
This commit is contained in:
Michael Snyder 2001-05-04 21:02:12 +00:00
parent 714b578b87
commit ca3f91ed68
2 changed files with 41 additions and 11 deletions

View File

@ -228,6 +228,26 @@ Sun Feb 4 17:32:21 2001 Andrew Cagney <cagney@redhat.com>
* gdb.c++/templates.cc (printf): Remove unused function definition.
2001-01-26 Felix Lee <flee@redhat.com>
* sid.exp (sid_exit): Pass host, not target, to remote_close.
2001-01-25 matthew green <mrg@redhat.com>
* 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 <mrg@redhat.com>
* 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 <mrg@redhat.com>
* config/sid.exp (sid_start): Handle sim,protocol of `sid.'
2001-01-17 Ben Elliston <bje@redhat.com>
* config/sid.exp: New file.

View File

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