+2012-10-02 Doug Evans <dje@google.com>
+
+ * lib/gdb.exp (gdb_unload): Change wording of perror text to be
+ more consistent.
+ (runto,gdb_debug_format): Ditto.
+ (gdb_file_cmd): Watch for eof in nested gdb_expect.
+ Clean up logging and error messages.
+
2012-10-01 Andrew Burgess <aburgess@broadcom.com>
Test find command on unmapped memory.
}
-re "$gdb_prompt $" {}
timeout {
- perror "couldn't unload file in $GDB (timed out)."
+ perror "couldn't unload file in $GDB (timeout)."
return -1
}
}
return 0
}
eof {
- fail "running to $function in runto (end of file)"
+ fail "running to $function in runto (eof)"
return 0
}
timeout {
global GDB
global last_loaded_file
+ # Save this for the benefit of gdbserver-support.exp.
set last_loaded_file $arg
# Set whether debug info was found.
send_gdb "file $arg\n"
gdb_expect 120 {
-re "Reading symbols from.*no debugging symbols found.*done.*$gdb_prompt $" {
- verbose "\t\tLoaded $arg into the $GDB with no debugging symbols"
+ verbose "\t\tLoaded $arg into $GDB with no debugging symbols"
set gdb_file_cmd_debug_info "nodebug"
return 0
}
-re "Reading symbols from.*done.*$gdb_prompt $" {
- verbose "\t\tLoaded $arg into the $GDB"
+ verbose "\t\tLoaded $arg into $GDB"
set gdb_file_cmd_debug_info "debug"
return 0
}
return 0
}
timeout {
- perror "(timeout) Couldn't load $arg, other program already loaded."
+ perror "Couldn't load $arg, other program already loaded (timeout)."
return -1
}
+ eof {
+ perror "Couldn't load $arg, other program already loaded (eof)."
+ return -1
+ }
}
}
-re "No such file or directory.*$gdb_prompt $" {
return -1
}
-re "$gdb_prompt $" {
- perror "couldn't load $arg into $GDB."
+ perror "Couldn't load $arg into $GDB."
return -1
}
timeout {
- perror "couldn't load $arg into $GDB (timed out)."
+ perror "Couldn't load $arg into $GDB (timeout)."
return -1
}
eof {
# This is an attempt to detect a core dump, but seems not to
# work. Perhaps we need to match .* followed by eof, in which
# gdb_expect does not seem to have a way to do that.
- perror "couldn't load $arg into $GDB (end of file)."
+ perror "Couldn't load $arg into $GDB (eof)."
return -1
}
}
return 1;
}
timeout {
- warning "couldn't check debug format (timed out)."
+ warning "couldn't check debug format (timeout)."
return 1;
}
}