From 954f33cfc0302ad8e5964444038f881a06502f57 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Thu, 16 Sep 1993 23:21:56 +0000 Subject: [PATCH] Use new proc for "file" command to load symbol tables. --- gdb/testsuite/config/unix-gdb.exp | 57 +------------------------------ 1 file changed, 1 insertion(+), 56 deletions(-) diff --git a/gdb/testsuite/config/unix-gdb.exp b/gdb/testsuite/config/unix-gdb.exp index 855ffdef185..db3341862c4 100644 --- a/gdb/testsuite/config/unix-gdb.exp +++ b/gdb/testsuite/config/unix-gdb.exp @@ -84,62 +84,7 @@ proc gdb_load { arg } { global GDB global prompt - set loadfile [file tail $arg] - set loadpath [file dirname $arg] - send "file $arg\n" - expect { - -re "Reading symbols from.*done.*$prompt $" { - if $verbose>1 then { - send_user "\t\tLoaded $arg into the $GDB\n" - } - return 0 - } - -re "has no symbol-table.*$prompt $" { - error "$arg wasn't compiled with \"-g\"" - return -1 - } - -re "A program is being debugged already..*Kill it\? \(y or n\) $" { - send "y\n" - if $verbose>1 then { - send_user "\t\tKilling previous program being debugged\n" - } - continue -expect - } - -re "Load new symbol table from.*\? \(y or n\) $" { - send "y\n" - expect { - -re "Reading symbols from.*done.*$prompt $" { - if $verbose>1 then { - send_user "\t\tLoaded $arg with new symbol table into $GDB\n" - } - return 0 - } - 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" - 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 - } - 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 - # expect does not seem to have a way to do that. - error "couldn't load $arg into $GDB (end of file)." - return -1 - } - } + return [gdb_file_cmd $arg] } # -- 2.30.2