gdb/gdbserver/
authorPedro Alves <palves@redhat.com>
Mon, 12 Apr 2010 17:39:42 +0000 (17:39 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 12 Apr 2010 17:39:42 +0000 (17:39 +0000)
* linux-low.c (linux_mourn): Also remove the process.
* server.c (handle_target_event): Don't remove the process here.
* nto-low.c (nto_mourn): New.
(nto_target_ops): Install it.
* spu-low.c (spu_mourn): New.
(spu_target_ops): Install it.
* win32-low.c (win32_mourn): New.
(win32_target_ops): Install it.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c
gdb/gdbserver/nto-low.c
gdb/gdbserver/server.c
gdb/gdbserver/spu-low.c
gdb/gdbserver/win32-low.c

index c190ed7ffd3977fbfc17f62f5eb90d796ed0b28c..2965f36c2094e47422fa9971948fd5d135df71b4 100644 (file)
@@ -1,3 +1,15 @@
+2010-04-12  Pedro Alves  <pedro@codesourcery.com>
+
+       gdb/gdbserver/
+       * linux-low.c (linux_mourn): Also remove the process.
+       * server.c (handle_target_event): Don't remove the process here.
+       * nto-low.c (nto_mourn): New.
+       (nto_target_ops): Install it.
+       * spu-low.c (spu_mourn): New.
+       (spu_target_ops): Install it.
+       * win32-low.c (win32_mourn): New.
+       (win32_target_ops): Install it.
+
 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
 
        * server.h (buffer_xml_printf): Remove redundant `;'.
index fcdcc45fdb9cc64d8c42c04078a1bba6db24455b..9692f215713538b9f70345a2496b50a571b6ec78 100644 (file)
@@ -901,6 +901,8 @@ linux_mourn (struct process_info *process)
   free (priv->arch_private);
   free (priv);
   process->private = NULL;
+
+  remove_process (process);
 }
 
 static void
index 854208291e919f0e98db4e2c7eb2d6b72963c983..17548a42e1fc208639a40906402b1c3ddf91f9ce 100644 (file)
@@ -406,6 +406,12 @@ nto_detach (int pid)
   return 0;
 }
 
+static void
+nto_mourn (struct process_info *process)
+{
+  remove_process (process);
+}
+
 /* Check if the given thread is alive.  
 
    Return 1 if alive, 0 otherwise.  */
@@ -900,7 +906,7 @@ static struct target_ops nto_target_ops = {
   nto_attach,
   nto_kill,
   nto_detach,
-  NULL, /* nto_mourn */
+  nto_mourn,
   NULL, /* nto_join */
   nto_thread_alive,
   nto_resume,
index 8666bcd87899f37fae5d861841e3de3fdc1ab1fc..423a993f2be1065249e8dacbe77f48fc9ce548b4 100644 (file)
@@ -2999,10 +2999,7 @@ handle_target_event (int err, gdb_client_data client_data)
 
       if (last_status.kind == TARGET_WAITKIND_EXITED
          || last_status.kind == TARGET_WAITKIND_SIGNALLED)
-       {
-         mourn_inferior (process);
-         remove_process (process);
-       }
+       mourn_inferior (process);
 
       if (forward_event)
        {
index d171abc3fc48d8d7fef48a0b4a42d695d71cacda..d9ac815d20ff726c3adb29b33a5682a99e2ea353 100644 (file)
@@ -354,6 +354,12 @@ spu_detach (int pid)
   return 0;
 }
 
+static void
+spu_mourn (struct process_info *process)
+{
+  remove_process (process);
+}
+
 static void
 spu_join (int pid)
 {
@@ -606,7 +612,7 @@ static struct target_ops spu_target_ops = {
   spu_attach,
   spu_kill,
   spu_detach,
-  NULL, /* mourn */
+  spu_mourn,
   spu_join,
   spu_thread_alive,
   spu_resume,
index ea5de4cd9837af4c33c391df7c7f80e8980f98bb..dfdb88369de66ab5d62dabc15c3192bf463bbbbf 100644 (file)
@@ -763,6 +763,12 @@ win32_detach (int pid)
   return 0;
 }
 
+static void
+win32_mourn (struct process_info *process)
+{
+  remove_process (process);
+}
+
 /* Wait for inferiors to end.  */
 static void
 win32_join (int pid)
@@ -1752,7 +1758,7 @@ static struct target_ops win32_target_ops = {
   win32_attach,
   win32_kill,
   win32_detach,
-  NULL,
+  win32_mourn,
   win32_join,
   win32_thread_alive,
   win32_resume,