gdb: Don't call gdb_load_shlib unless GDB is running
[deliverable/binutils-gdb.git] / gdb / testsuite / lib / gdb.exp
index aef580b04d3beb0c8a14a308cb34f352efdcf9ce..3e2f755e5b77a0db9e7294d3b117dc17a5293367 100644 (file)
@@ -4483,6 +4483,12 @@ proc gdb_remote_download {dest fromfile {tofile {}}} {
 # Copy the listed library to the target.
 
 proc gdb_load_shlib { file } {
+    global gdb_spawn_id
+
+    if ![info exists gdb_spawn_id] {
+       perror "gdb_load_shlib: GDB is not running"
+    }
+
     set dest [gdb_remote_download target [shlib_target_file $file]]
 
     if {[is_remote target]} {
This page took 0.023482 seconds and 4 git commands to generate.