* remote.c (remote_open): Set inferior_pid to make kill command
authorStu Grossman <grossman@cygnus>
Thu, 4 Aug 1994 17:32:09 +0000 (17:32 +0000)
committerStu Grossman <grossman@cygnus>
Thu, 4 Aug 1994 17:32:09 +0000 (17:32 +0000)
happy.
* inflow.c (kill_command):  Revert change of Aug 2.  Use
inferior_pid to determine whether to print out "The program is not
being run." message.

gdb/ChangeLog
gdb/remote.c

index e2bf3b54b1312adca3ba65dc9710610db566806f..b07803f6e16ba6d59bf5f64db8b1cda219c62151 100644 (file)
@@ -1,3 +1,11 @@
+Thu Aug  4 10:26:36 1994  Stu Grossman  (grossman@rtl.cygnus.com)
+
+       * remote.c (remote_open):  Set inferior_pid to make kill command
+       happy.
+       * inflow.c (kill_command):  Revert change of Aug 2.  Use
+       inferior_pid to determine whether to print out "The program is not
+       being run." message.
+
 Thu Aug  4 07:55:04 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
        * config/i386/i386m3.mh (NAT_CLIBS): Add -lmachid and -lnetname.
index 828b06215b7cb8788f7383d53d1e02c2ce56e24f..a6ea4242b5f9145e518d0aa1e5cb05473e29765f 100644 (file)
@@ -414,6 +414,15 @@ device is attached to the remote system (e.g. /dev/ttya).");
   if (!catch_errors (remote_start_remote, (char *)0, 
        "Couldn't establish connection to remote target\n", RETURN_MASK_ALL))
     pop_target();
+
+  /* Without this, some commands which require an active target (such as kill)
+     won't work.  This variable serves (at least) double duty as both the pid
+     of the target process (if it has such), and as a flag indicating that a
+     target is active.  These functions should be split out into seperate
+     variables, especially since GDB will someday have a notion of debugging
+     several processes.  */
+
+  inferior_pid = -1;
 }
 
 /* remote_detach()
@@ -634,7 +643,7 @@ remote_wait (pid, status)
          continue;
        }
     }
-  return 0;
+  return inferior_pid;
 }
 
 /* Number of bytes of registers this stub implements.  */
This page took 0.036026 seconds and 4 git commands to generate.