# compilers and assemblers
CC = m68k-coff-gcc
-CFLAGS = -g -D${target_os} -u read
+CFLAGS = -g -D${target_os}
C++ = ${CC}
C++FLAGS = ${CFLAGS}
CXX = ${CC}
FC =
FCFLAGS =
LD = ld
-LDFLAGS = -T${srcdir}/config/m68k.gld
-LIBS = -lstub
+LDFLAGS = -T/usr/cygnus/progressive-921225/H-sparc-sun-sunos4.1.1/lib/gcc-lib/m68k-coff/cygnus-2.2.4/mvme135.ld
+LIBS = -lgcc -lc -lg -lmvme135
# binutils
DEMANGLE = m68k-coff-demangle
DEMANGLEFLAGS =
-COPY = m68k-coff-copy
+COPY = m68k-coff-objcopy
COPYFLAGS =
# other utils
DIFF = diff
DIFFFLAGS =
+RUNTEST=m68k-coff-runtest
+RUNTESTFLAGS=
# This file was written by Rob Savoye. (rob@cygnus.com)
+load_lib gdb.exp
+
# variables that need to set up
#
if ![info exists prompt] then {
if $verbose>1 then {
send_user "Spawning $GDB $GDBFLAGS\n"
}
-
+
set oldtimeout $timeout
set timeout [expr "$timeout + 60"]
if [ llength $GDBFLAGS ] then {
if {[which $GDB] != 0} then {
- spawn $GDB $GDBFLAGS
- } else {
+ spawn $GDB $GDBFLAGS
+ } else {
error "$GDB does not exist."
exit 1
}
} else {
if {[which $GDB] != 0} then {
- spawn $GDB
+ spawn $GDB
} else {
error "$GDB does not exist."
exit 1
-re ".*$prompt $" {
if $verbose>1 then {
send_user "GDB initialized for native mode\n"
+ }
}
- }
-re "$prompt $" {
error "GDB never initialized."
return -1
-re ".*$prompt $" {
if $verbose>2 then {
send_user "Seting width to 0.\n"
-}
+ }
}
timeout {
warning "Couldn't set the width to 0."
-}
+ }
}
}
+proc gdb_exit { } {
+ default_gdb_exit
+}
+
# These only need to be uncommented for debugging test cases. They exist
# mainly to catch programming errors
#expect_after {
# "Undefined command" { error "send string probably wrong." }
#}
-load_lib gdb.exp
set binpath /s1/users/rob/vxworks/bin/somewhere-bogus-that-needs-configuring
set bin $GDB
# load support libraries
#
load_lib remote.exp
+load_lib gdb.exp
+load_lib vxworks.exp
+
set shell_prompt "->"
# these need to be initialized only if site.exp doesn't set them
# reboot vxworks to get a clean start
if $reboot then {
- send_user "Rebooting VxWorks, Please wait...\n"
+ verbose "Rebooting VxWorks, Please wait...\n"
send -i $shell_id "\CX"
set timeout 120
expect {
-i $shell_id -re "Connection closed.*$" {
- verbose "\nVxWorks has closed the shell" 1
+ verbose "\nVxWorks has closed the shell"
}
- eof { error "(eof) never disconnected from VxWorks shell."; return -1 }
- timeout { error "(timeout) never disconnected from VxWorks shell."; return -1 }
+ -i $shell_id eof {
+ error "(eof) never disconnected from VxWorks shell."
+ return -1
+ }
+ -i $shell_id timeout {
+ error "(timeout) never disconnected from VxWorks shell."
+ return -1
+ }
}
- close -i $shell_id
-
- exec sleep 30
+ catch "close -i $shell_id" tmp
+ wait -i $shell_id
+# exec sleep 30
- set timeout 60
- set shell_id [ eval $connectmode "$targetname" ]
- if $shell_id<0 then {
- error "Couldn't connect to $targetname."
- }
+# set timeout 60
+# set shell_id [ eval $connectmode "$targetname" ]
+# if $shell_id<0 then {
+# error "Couldn't connect to $targetname."
+# }
}
set timeout 10
# start GDB
if [ llength $GDBFLAGS ] then {
- spawn $GDB $GDBFLAGS
+ if {[which $GDB] != 0} then {
+ spawn $GDB $GDBFLAGS
+ } else {
+ error "$GDB does not exist."
+ exit 1
+ }
} else {
- spawn $GDB
+ if {[which $GDB] != 0} then {
+ spawn $GDB
+ } else {
+ error "$GDB does not exist."
+ exit 1
+ }
}
expect {
- -re ".*$prompt $" {
- verbose "$GDB initialized for cross mode to Vxworks\n" 1
+ -re ".*$prompt $" {
+ verbose "$GDB initialized for cross mode to Vxworks\n"
+ }
+ -re "$prompt $" {
+ error "GDB never initialized."
+ return -1
+ }
+ timeout {
+ error "(timeout) GDB never initialized."
+ return -1
}
- -re "$prompt $" { error "GDB never initialized."; return -1 }
- timeout { error "(timeout) GDB never initialized.";
- return -1 }
}
# force the height to "unlimited", so no pagers get used
set timeout 10
}
+proc gdb_exit { } {
+ global shell_id
+ exit_remote_shell $shell_id
+ default_gdb_exit
+}
+
#expect_after {
# "<return>" { send "\n"; error "Window too small." }
# -re "\(y or n\) " { send "n\n"; error "Got interactive prompt." }
# "Undefined command" { error "send string probably wrong." }
#}
-load_lib gdb.exp
-
gdb_start
-# make sure gdb has actually started, otherwise if the first test
-# timesout, DejaGnu crashes
-#send "\n"
-#expect {
-# -re "$prompt"
-# }
-