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
}
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
timeout {
error "Couldn't set MIPS target."
set timeout 10
- alldone
+ return -1
}
}
set timeout 10
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
}
#
global prompt
global verbose
global targetname
- send_user "Not implememted yet\n" ; alldone
+ send_user "Not implememted yet\n" ; return -1
}
expect_after {
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
timeout {
error "Couldn't set target for vxworks."
set timeout 10
- alldone
+ return -1
}
}
set timeout 10
-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
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 }
}
}
-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
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
# 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
# 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
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
timeout {
error "Couldn't set target for vxworks."
set timeout 10
- alldone
+ return -1
}
}
set timeout 10