* config/sim.exp: Use 'target sim -sparclite' when running

SPARClite programs.
This commit is contained in:
Mark Alexander 1998-05-17 06:25:03 +00:00
parent fb543fc8ba
commit 7ec482ba5d
2 changed files with 24 additions and 14 deletions

View File

@ -1,3 +1,8 @@
Sat May 16 23:22:09 1998 Mark Alexander <marka@cygnus.com>
* config/sim.exp: Use 'target sim -sparclite' when running
SPARClite programs.
Sat May 16 18:48:08 1998 Doug Evans <devans@canuck.cygnus.com>
* gdb.base/structs2.exp: New file.

View File

@ -1,5 +1,5 @@
# Test Framework Driver for GDB driving a builtin simulator
# Copyright 1994 Free Software Foundation, Inc.
# Copyright 1994, 1997, 1998 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
load_lib gdb.exp
@ -27,23 +27,31 @@ if [istarget "sh*-*-*"] then {
set target_sim_options "18"
}
# The ERC32 simulator requires the argument -sparclite in order
# to emulate sparclite-specific instructions.
if [istarget "sparclite*-*-*"] then {
set target_sim_options "-sparclite"
}
if [istarget "sparc86x*-*-*"] then {
set target_sim_options "-sparclite"
}
#
# gdb_target_sim
# Set gdb to target the simulator
#
proc gdb_target_sim { } {
global prompt
global gdb_prompt
global verbose
global exit_status
global target_sim_options
global gdb_spawn_id
set spawn_id $gdb_spawn_id
send_gdb "target sim $target_sim_options\n"
set timeout 60
verbose "Timeout is now $timeout seconds" 2
expect {
-re "Connected to the simulator.*$prompt $" {
gdb_expect {
-re "Connected to the simulator.*$gdb_prompt $" {
verbose "Set target to sim"
}
timeout {
@ -65,10 +73,7 @@ proc gdb_load { arg } {
global loadpath
global loadfile
global GDB
global prompt
global gdb_spawn_id
set spawn_id $gdb_spawn_id
global gdb_prompt
if [gdb_file_cmd $arg] then { return -1 }
@ -77,8 +82,8 @@ proc gdb_load { arg } {
send_gdb "load\n"
set timeout 2400
verbose "Timeout is now $timeout seconds" 2
expect {
-re ".*$prompt $" {
gdb_expect {
-re ".*$gdb_prompt $" {
if $verbose>1 then {
send_user "Loaded $arg into $GDB\n"
}
@ -86,7 +91,7 @@ proc gdb_load { arg } {
verbose "Timeout is now $timeout seconds" 2
return 1
}
-re "$prompt $" {
-re "$gdb_prompt $" {
if $verbose>1 then {
perror "GDB couldn't load."
}