aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/config
diff options
context:
space:
mode:
authorRob Savoye <rob@cygnus>1996-05-08 04:04:25 +0000
committerRob Savoye <rob@cygnus>1996-05-08 04:04:25 +0000
commit4db6401f2787b7243e7d55e1533db69906800da0 (patch)
treea54b3b9723d81c2c1a5cf48aca3255d5547e8cae /gdb/testsuite/config
parent37316b52efe38837b093c8945d1ed759b73d73e1 (diff)
downloadgdb-4db6401f2787b7243e7d55e1533db69906800da0.zip
gdb-4db6401f2787b7243e7d55e1533db69906800da0.tar.gz
gdb-4db6401f2787b7243e7d55e1533db69906800da0.tar.bz2
* config/abug.exp: New file for the older Motorola Bug monitor
that runs on the mvme13x series VME boards. * config/monitor.exp: Use the new config array for target settings if they exist.
Diffstat (limited to 'gdb/testsuite/config')
-rw-r--r--gdb/testsuite/config/abug.exp2
-rw-r--r--gdb/testsuite/config/monitor.exp33
2 files changed, 25 insertions, 10 deletions
diff --git a/gdb/testsuite/config/abug.exp b/gdb/testsuite/config/abug.exp
new file mode 100644
index 0000000..8bd4532
--- /dev/null
+++ b/gdb/testsuite/config/abug.exp
@@ -0,0 +1,2 @@
+push_target mvme135
+load_lib ../config/monitor.exp
diff --git a/gdb/testsuite/config/monitor.exp b/gdb/testsuite/config/monitor.exp
index 41ddea8..9c6d9b1 100644
--- a/gdb/testsuite/config/monitor.exp
+++ b/gdb/testsuite/config/monitor.exp
@@ -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., 675 Mass Ave, Cambridge, MA 02139, USA. */
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
load_lib gdb.exp
@@ -34,14 +34,24 @@ proc gdb_target_monitor { } {
global targetname
global serialport
global baud
+ global target_info
set timeout 60
+ if {$baud != ""} then {
+ send "set remotebaud $baud\n"
+ }
+ if [info exists target_info(target,cflags)] {
+ set targetname "$target_info(target,target)"
+ }
+ if [info exists target_info(target,netport)] {
+ set serialport "$target_info(target,netport)"
+ }
for {set i 1} {$i <= 3} {incr i} {
send "target $targetname $serialport\n"
expect {
-re "Remote target $targetname connected to.*$prompt $" {
verbose "Set target to $targetname"
- break
+ return
}
-re "Connection refused" {
verbose "Connection refused by remote target. Pausing, and trying again."
@@ -49,12 +59,14 @@ proc gdb_target_monitor { } {
continue
}
timeout {
- perror "Couldn't set target for $targetname."
- cleanup
- exit $exit_status
+ break
}
}
}
+
+ perror "Couldn't set target for $targetname."
+ cleanup
+ exit $exit_status
}
#
@@ -72,22 +84,23 @@ proc gdb_load { arg } {
gdb_target_monitor
- send "load\n"
+ verbose "Loading $arg"
+ send "load $arg\n"
set timeout 600
expect {
-re ".*$prompt $" {
- if $verbose>1 then {
+ if { $verbose > 1 } {
send_user "Loaded $arg into $GDB\n"
}
return 1
}
-re "$prompt $" {
- if $verbose>1 then {
- perror "GDB couldn't load."
+ if { $verbose > 1 } {
+ perror "GDB couldn't load."
}
}
timeout {
- if $verbose>1 then {
+ if { $verbose > 1 } {
perror "Timed out trying to load $arg."
}
}