Doesn't exit after internal errors.

This commit is contained in:
Rob Savoye 1993-03-07 23:11:56 +00:00
parent 946f014bf8
commit 05a291bb1f
5 changed files with 25 additions and 24 deletions

View file

@ -167,12 +167,12 @@ proc gdb_start { } {
send -i $shell_id "\CC"
expect -i $shell_id {
-re "<IDT>$" { }
timeout { error "(timeout) board did not come up."; alldone }
timeout { error "(timeout) board did not come up."; return -1 }
}
send -i $shell_id "go 0xbfc00000"
expect -i $shell_id {
-re "<IDT>$" { }
timeout { error "(timeout) board did not come up."; alldone }
timeout { error "(timeout) board did not come up."; return -1 }
}
exit_remote_shell $shell_id
}
@ -190,9 +190,9 @@ proc gdb_start { } {
send_user "$GDB initialized for cross mode\n\n"
}
}
-re "$prompt $" { error "GDB never initialized."; alldone }
-re "$prompt $" { error "GDB never initialized."; return -1 }
timeout { error "(timeout) GDB never initialized.";
alldone }
return -1 }
}
# force the height to "unlimited", so no pagers get used
@ -221,7 +221,7 @@ proc gdb_start { } {
timeout {
error "Couldn't set MIPS target."
set timeout 10
alldone
return -1
}
}
set timeout 10

View file

@ -49,7 +49,7 @@ proc gdb_load { arg } {
global GDB
set loadfile [file tail $arg]
set loadpath [file dirname $arg]
send_user "Not implememted yet\n" ; alldone
send_user "Not implememted yet\n" ; return -1
}
#
@ -93,7 +93,7 @@ proc gdb_start { } {
global prompt
global verbose
global targetname
send_user "Not implememted yet\n" ; alldone
send_user "Not implememted yet\n" ; return -1
}
expect_after {

View file

@ -145,9 +145,9 @@ proc gdb_start { } {
send_user "$GDB initialized for cross mode\n\n"
}
}
-re "$prompt $" { error "GDB never initialized."; alldone }
-re "$prompt $" { error "GDB never initialized."; return -1 }
timeout { error "(timeout) GDB never initialized.";
alldone }
return -1 }
}
# force the height to "unlimited", so no pagers get used
@ -178,7 +178,7 @@ proc gdb_start { } {
timeout {
error "Couldn't set target for vxworks."
set timeout 10
alldone
return -1
}
}
set timeout 10

View file

@ -71,13 +71,14 @@ proc gdb_unload {} {
-re "$prompt $" {}
timeout {
error "Couldn't unload file in $GDB (timed out)."
alldone
return -1
}
}
}
#
# gdb_load -- load a file into the debugger.
# return a -1 if anything goes wrong.
#
proc gdb_load { arg } {
global verbose
@ -114,13 +115,13 @@ proc gdb_load { arg } {
send_user "\t\tLoaded $arg with new symbol table into $GDB\n"
}
}
timeout { error "(timeout) Couldn't load $arg, other program already loaded."; alldone }
timeout { error "(timeout) Couldn't load $arg, other program already loaded."; return -1 }
}
}
-re ".*No such file or directory.*$prompt $"\
{ error "($arg) No such file or directory\n"; alldone }
-re "$prompt $" { error "couldn't load $arg into $GDB."; alldone }
timeout { error "couldn't load $arg into $GDB (timed out)."; alldone }
{ error "($arg) No such file or directory\n"; return -1 }
-re "$prompt $" { error "couldn't load $arg into $GDB."; return -1 }
timeout { error "couldn't load $arg into $GDB (timed out)."; return -1 }
}
}
@ -190,8 +191,8 @@ proc gdb_start {} {
-re ".*$prompt $" { if $verbose>1 then {
send_user "GDB initialized for native mode\n" }
}
-re "$prompt $" { error "GDB never initialized."; alldone }
timeout { error "(timeout) GDB never initialized."; alldone }
-re "$prompt $" { error "GDB never initialized."; return -1 }
timeout { error "(timeout) GDB never initialized."; return -1 }
}
set timeout $oldtimeout
# force the height to "unlimited", so no pagers get used

View file

@ -179,8 +179,8 @@ proc gdb_start { } {
send_user "\nVxWorks has closed the shell\n"
}
}
eof { error "(eof) never disconnected from VxWorks shell."; alldone }
timeout { error "(timeout) never disconnected from VxWorks shell."; alldone }
eof { error "(eof) never disconnected from VxWorks shell."; return -1 }
timeout { error "(timeout) never disconnected from VxWorks shell."; return -1 }
}
close -i $shell_id
@ -202,7 +202,7 @@ proc gdb_start { } {
# send_user "\nVxWorks set host=$vx_host, uid=$vx_uid, gid=$vx_gid\n"
# }
# }
# timeout { error "couldn't set host=$vx_host, uid=$vx_uid, gid=$vx_gid\n"; alldone }
# timeout { error "couldn't set host=$vx_host, uid=$vx_uid, gid=$vx_gid\n"; return -1 }
#}
#send -i $shell_id cd \"$base_dir\"\n
@ -212,7 +212,7 @@ proc gdb_start { } {
# send_user "VxWorks changed directory to $base_dir\n"
# }
# }
# timeout { error "couldn't load $arg into $bin."; alldone }
# timeout { error "couldn't load $arg into $bin."; return -1 }
#}
spawn_vxgdb
@ -238,9 +238,9 @@ proc spawn_vxgdb { } {
send_user "$GDB initialized for cross mode to Vxworks\n\n"
}
}
-re "$prompt $" { error "GDB never initialized."; alldone }
-re "$prompt $" { error "GDB never initialized."; return -1 }
timeout { error "(timeout) GDB never initialized.";
alldone }
return -1 }
}
# force the height to "unlimited", so no pagers get used
@ -273,7 +273,7 @@ proc spawn_vxgdb { } {
timeout {
error "Couldn't set target for vxworks."
set timeout 10
alldone
return -1
}
}
set timeout 10