remove target_acknowledge_created_inferior
authorJoel Brobecker <brobecker@gnat.com>
Tue, 28 Dec 2010 11:40:27 +0000 (11:40 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 28 Dec 2010 11:40:27 +0000 (11:40 +0000)
This target_ops routine appears to be unused in practice, so this patch
removes it.

gdb/ChangeLog:

        * inf-child.c (inf_child_acknowledge_created_inferior): Delete.
        (inf_child_target): Do not set t->to_acknowledge_created_inferior.
        * inf-ptrace.c (inf_ptrace_create_inferior): Remove call to
        target_acknowledge_created_inferior.
        * inf-ttrace.c (inf_ttrace_him): Likewise.
        * target.h (struct target_ops): Delete to_acknowledge_created_inferior
        field.
        (target_acknowledge_created_inferior): Delete.
        * target.c (update_current_target): Remove setting of
        to_acknowledge_created_inferior field. Do default value for that
        field either.
        (debug_to_acknowledge_created_inferior): Delete.
        (setup_target_debug): Remove setting of
        current_target.to_acknowledge_created_inferior.

gdb/ChangeLog
gdb/inf-child.c
gdb/inf-ptrace.c
gdb/inf-ttrace.c
gdb/target.c
gdb/target.h

index fa158c00823e8434a8384d721458cce149448c92..9de2f460798899bddcf95deafe6e8ed8b287afaa 100644 (file)
@@ -1,3 +1,20 @@
+2010-12-28  Joel Brobecker  <brobecker@adacore.com>
+
+       * inf-child.c (inf_child_acknowledge_created_inferior): Delete.
+       (inf_child_target): Do not set t->to_acknowledge_created_inferior.
+       * inf-ptrace.c (inf_ptrace_create_inferior): Remove call to
+       target_acknowledge_created_inferior.
+       * inf-ttrace.c (inf_ttrace_him): Likewise.
+       * target.h (struct target_ops): Delete to_acknowledge_created_inferior
+       field.
+       (target_acknowledge_created_inferior): Delete.
+       * target.c (update_current_target): Remove setting of
+       to_acknowledge_created_inferior field. Do default value for that
+       field either.
+       (debug_to_acknowledge_created_inferior): Delete.
+       (setup_target_debug): Remove setting of
+       current_target.to_acknowledge_created_inferior.
+
 2010-12-27  Pedro Alves  <pedro@codesourcery.com>
 
        gdb/
index 72a18e41b9814661a986d62285ddd48a3c6cd7d6..ef652b8763ed40ecb178acf368423b4d5cea45a5 100644 (file)
@@ -87,13 +87,6 @@ inf_child_post_startup_inferior (ptid_t ptid)
      inferior" operation by a debugger.  */
 }
 
-static void
-inf_child_acknowledge_created_inferior (int pid)
-{
-  /* This version of Unix doesn't require a meaningful "acknowledge
-     created inferior" operation by a debugger.  */
-}
-
 static void
 inf_child_insert_fork_catchpoint (int pid)
 {
@@ -192,7 +185,6 @@ inf_child_target (void)
   t->to_terminal_ours = terminal_ours;
   t->to_terminal_info = child_terminal_info;
   t->to_post_startup_inferior = inf_child_post_startup_inferior;
-  t->to_acknowledge_created_inferior = inf_child_acknowledge_created_inferior;
   t->to_insert_fork_catchpoint = inf_child_insert_fork_catchpoint;
   t->to_remove_fork_catchpoint = inf_child_remove_fork_catchpoint;
   t->to_insert_vfork_catchpoint = inf_child_insert_vfork_catchpoint;
index 440f2ed7e7fe110697c01dee5c394056fd876bd3..d64c5195fc3046eff1e2236ed0eb4699efd80900 100644 (file)
@@ -139,13 +139,6 @@ inf_ptrace_create_inferior (struct target_ops *ops,
   if (! ops_already_pushed)
     discard_cleanups (back_to);
 
-  /* On some targets, there must be some explicit synchronization
-     between the parent and child processes after the debugger
-     forks, and before the child execs the debuggee program.  This
-     call basically gives permission for the child to exec.  */
-
-  target_acknowledge_created_inferior (pid);
-
   /* START_INFERIOR_TRAPS_EXPECTED is defined in inferior.h, and will
      be 1 or 2 depending on whether we're starting without or with a
      shell.  */
index aa0462ff235cc2eaabcb95b6980538b6c01df251..dd1c4bad5b2a16330532558371f00a8d8d0766ee 100644 (file)
@@ -625,13 +625,6 @@ inf_ttrace_him (struct target_ops *ops, int pid)
 
   push_target (ops);
 
-  /* On some targets, there must be some explicit synchronization
-     between the parent and child processes after the debugger forks,
-     and before the child execs the debuggee program.  This call
-     basically gives permission for the child to exec.  */
-
-  target_acknowledge_created_inferior (pid);
-
   /* START_INFERIOR_TRAPS_EXPECTED is defined in inferior.h, and will
      be 1 or 2 depending on whether we're starting without or with a
      shell.  */
index 59841258554a0a39b800bd2f829de7c777c759c1..91a38410591418e0d242e2f67a04dba7bb5dccea 100644 (file)
@@ -624,7 +624,6 @@ update_current_target (void)
       INHERIT (to_lookup_symbol, t);
       /* Do no inherit to_create_inferior.  */
       INHERIT (to_post_startup_inferior, t);
-      INHERIT (to_acknowledge_created_inferior, t);
       INHERIT (to_insert_fork_catchpoint, t);
       INHERIT (to_remove_fork_catchpoint, t);
       INHERIT (to_insert_vfork_catchpoint, t);
@@ -778,9 +777,6 @@ update_current_target (void)
   de_fault (to_post_startup_inferior,
            (void (*) (ptid_t))
            target_ignore);
-  de_fault (to_acknowledge_created_inferior,
-           (void (*) (int))
-           target_ignore);
   de_fault (to_insert_fork_catchpoint,
            (void (*) (int))
            tcomplain);
@@ -3648,15 +3644,6 @@ debug_to_post_startup_inferior (ptid_t ptid)
                      PIDGET (ptid));
 }
 
-static void
-debug_to_acknowledge_created_inferior (int pid)
-{
-  debug_target.to_acknowledge_created_inferior (pid);
-
-  fprintf_unfiltered (gdb_stdlog, "target_acknowledge_created_inferior (%d)\n",
-                     pid);
-}
-
 static void
 debug_to_insert_fork_catchpoint (int pid)
 {
@@ -3831,7 +3818,6 @@ setup_target_debug (void)
   current_target.to_load = debug_to_load;
   current_target.to_lookup_symbol = debug_to_lookup_symbol;
   current_target.to_post_startup_inferior = debug_to_post_startup_inferior;
-  current_target.to_acknowledge_created_inferior = debug_to_acknowledge_created_inferior;
   current_target.to_insert_fork_catchpoint = debug_to_insert_fork_catchpoint;
   current_target.to_remove_fork_catchpoint = debug_to_remove_fork_catchpoint;
   current_target.to_insert_vfork_catchpoint = debug_to_insert_vfork_catchpoint;
index 7290d90151ce175909af41b04f6c1cd70850ab5f..ea27b2ce31049b9219f5be3abe34b3603af2efbb 100644 (file)
@@ -467,7 +467,6 @@ struct target_ops
     void (*to_create_inferior) (struct target_ops *, 
                                char *, char *, char **, int);
     void (*to_post_startup_inferior) (ptid_t);
-    void (*to_acknowledge_created_inferior) (int);
     void (*to_insert_fork_catchpoint) (int);
     int (*to_remove_fork_catchpoint) (int);
     void (*to_insert_vfork_catchpoint) (int);
@@ -1026,12 +1025,6 @@ void target_create_inferior (char *exec_file, char *args,
 #define target_post_startup_inferior(ptid) \
      (*current_target.to_post_startup_inferior) (ptid)
 
-/* On some targets, the sequence of starting up an inferior requires
-   some synchronization between gdb and the new inferior process, PID.  */
-
-#define target_acknowledge_created_inferior(pid) \
-     (*current_target.to_acknowledge_created_inferior) (pid)
-
 /* On some targets, we can catch an inferior fork or vfork event when
    it occurs.  These functions insert/remove an already-created
    catchpoint for such events.  */