* config/udi-gdb.exp (gdb_load): Use "file", not "load" command,
authorJim Kingdon <jkingdon@engr.sgi.com>
Mon, 7 Feb 1994 00:06:45 +0000 (00:06 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Mon, 7 Feb 1994 00:06:45 +0000 (00:06 +0000)
since "run" automatically loads if necessary.

gdb/testsuite/ChangeLog
gdb/testsuite/config/udi-gdb.exp

index 1b3c1cd1769fed61ccc54c74960889e6070c7f46..0fadcd4754cba7ca3846b613db12c225e9c507e8 100644 (file)
@@ -1,5 +1,8 @@
 Sun Feb  6 15:36:13 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
+       * config/udi-gdb.exp (gdb_load): Use "file", not "load" command,
+       since "run" automatically loads if necessary.
+
        * config/udi-gdb.exp (gdb_start): Don't send "set args main" to
        GDB.  GDB doesn't work that way (not anymore at least) on UDI.
        * gdb.t01/run.exp: Don't pass extra first argument for UDI.
index ae44aa808543b1580225e0b0de0e0ea0fddf1e8d..0a78b3117c14eeff97eadc5f4d499c61f9716bc0 100644 (file)
@@ -42,39 +42,17 @@ proc gdb_version {} {
 }
 
 #
-# gdb_load -- load a file into the GDB. 
-#             Returns a 0 if there was an error,
-#                       1 if it load successfully.
+# gdb_load -- load a file into the debugger.
+#             return a -1 if anything goes wrong.
 #
 proc gdb_load { arg } {
     global verbose
     global loadpath
     global loadfile
-    global prompt
-    global spawn_id
     global GDB
-    global expect_out
+    global prompt
 
-    send "load $arg\n"
-    verbose "Loading $arg into $GDB"
-    expect {
-       -re "Loading.*\.text.*\.data.*\.bss.*Reading symbols from $arg.+done.*$prompt $" {
-           verbose "Loaded $arg into $GDB"
-           return 1
-       }
-       -re "$prompt $" {
-           error "Couldn't load $arg into $GDB."
-           return 0
-       }
-       timeout {
-               error "Timed out trying to load $arg."
-           return 0
-       }
-    }
-    if [info exists expect_out(buffer)] then {
-       send_log $expect_out(buffer)
-    }
-    return 0
+    return [gdb_file_cmd $arg]
 }
 
 #
This page took 0.035168 seconds and 4 git commands to generate.