* linux-low.c (linux_join): Skip process lookup.
authorDoug Evans <dje@google.com>
Wed, 4 May 2011 20:20:12 +0000 (20:20 +0000)
committerDoug Evans <dje@google.com>
Wed, 4 May 2011 20:20:12 +0000 (20:20 +0000)
* spu-low.c (spu_join): Ditto.
* server.c (join_inferiors_callback): Delete.
(process_serial_event): For 'D' packet (detach) call join_inferior
directly.

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

index 42b30a4549bae36c370f91d1ee2e87a78901a4fc..a29ee23b430e140265920749153c7ab7e4d222e2 100644 (file)
@@ -1,3 +1,11 @@
+2011-05-04  Doug Evans  <dje@google.com>
+
+       * linux-low.c (linux_join): Skip process lookup.
+       * spu-low.c (spu_join): Ditto.
+       * server.c (join_inferiors_callback): Delete.
+       (process_serial_event): For 'D' packet (detach) call join_inferior
+       directly.
+
 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
 
        * README: Don't mention xscale*-*-linux*.
index 23554db5d99a314f78d40338b240ebc6e75f838d..d84fd680b73e20c27b4527fd56b4c3ce1c20c2cd 100644 (file)
@@ -878,11 +878,6 @@ static void
 linux_join (int pid)
 {
   int status, ret;
-  struct process_info *process;
-
-  process = find_process_pid (pid);
-  if (process == NULL)
-    return;
 
   do {
     ret = my_waitpid (pid, &status, 0);
index 8b9133b03468789829cc4d72b8a582016a34b12f..6bf6eaac00435ff1fa3818dc4578654c67551290 100644 (file)
@@ -2442,17 +2442,6 @@ detach_or_kill_for_exit (void)
   for_each_inferior (&all_processes, detach_or_kill_inferior_callback);
 }
 
-static void
-join_inferiors_callback (struct inferior_list_entry *entry)
-{
-  struct process_info *process = (struct process_info *) entry;
-
-  /* If we are attached, then we can exit.  Otherwise, we need to hang
-     around doing nothing, until the child is gone.  */
-  if (!process->attached)
-    join_inferior (ptid_get_pid (process->head.id));
-}
-
 int
 main (int argc, char *argv[])
 {
@@ -2851,8 +2840,7 @@ process_serial_event (void)
              /* If we are attached, then we can exit.  Otherwise, we
                 need to hang around doing nothing, until the child is
                 gone.  */
-             for_each_inferior (&all_processes,
-                                join_inferiors_callback);
+             join_inferior (pid);
              exit (0);
            }
        }
index 93ed75a4efcb0ca59a7229e5d538543b70df6170..898e46d6f7eb14fa7b32f781b8bfefb54e9784df 100644 (file)
@@ -365,11 +365,6 @@ static void
 spu_join (int pid)
 {
   int status, ret;
-  struct process_info *process;
-
-  process = find_process_pid (pid);
-  if (process == NULL)
-    return;
 
   do {
     ret = waitpid (pid, &status, 0);
This page took 0.036379 seconds and 4 git commands to generate.