This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Delete target_post_wait


It turns out that this method is only set to an empty function, this zaps the dead method and all references.

committed,
Andrew
2004-09-29  Andrew Cagney  <cagney@gnu.org>

	* target.h (struct target_ops): Delete field to_post_wait.
	(target_post_wait): Delete macro.
	(child_post_wait): Delete declaration.
	* target.c (update_current_target, update_current_target)
	(debug_to_post_wait, setup_target_debug): Delete functions and
	references.
	* infttrace.c (ptrace_wait): Delete call to target_post_wait.
	* inftarg.c (child_post_wait): Delete.
	(init_child_ops): Do not set to_post_wait.
	* infptrace.c (ptrace_wait): Delete call to target_post_wait.
	* inf-ptrace.c (inf_ptrace_wait): Delete call to target_post_wait.
	* inf-child.c (inf_child_post_wait): Delete.
	(inf_child_target): Do not set to_post_wait.
	* inf-ptrace.c (inf_ptrace_post_wait): Delete.
	(inf_ptrace_target): Do not set to_post_wait.

Index: inf-child.c
===================================================================
RCS file: /cvs/src/src/gdb/inf-child.c,v
retrieving revision 1.3
diff -p -u -r1.3 inf-child.c
--- inf-child.c	18 Sep 2004 22:51:26 -0000	1.3
+++ inf-child.c	29 Sep 2004 15:31:52 -0000
@@ -52,13 +52,6 @@ inf_child_store_inferior_registers (int 
 {
 }
 
-void
-inf_child_post_wait (ptid_t ptid, int wait_status)
-{
-  /* This version of Unix doesn't require a meaningful "post wait"
-     operation.  */
-}
-
 static void
 inf_child_post_attach (int pid)
 {
@@ -197,7 +190,6 @@ inf_child_target (void)
   t->to_doc = "Unix child process (started by the \"run\" command).";
   t->to_open = inf_child_open;
   t->to_post_attach = inf_child_post_attach;
-  t->to_post_wait = inf_child_post_wait;
   t->to_fetch_registers = inf_child_fetch_inferior_registers;
   t->to_store_registers = inf_child_store_inferior_registers;
   t->to_prepare_to_store = inf_child_prepare_to_store;
Index: inf-ptrace.c
===================================================================
RCS file: /cvs/src/src/gdb/inf-ptrace.c,v
retrieving revision 1.5
diff -p -u -r1.5 inf-ptrace.c
--- inf-ptrace.c	25 Sep 2004 12:32:01 -0000	1.5
+++ inf-ptrace.c	29 Sep 2004 15:31:52 -0000
@@ -256,7 +256,6 @@ inf_ptrace_wait (ptid_t ptid, struct tar
       set_sigio_trap ();
 
       pid = wait (&status);
-      target_post_wait (pid_to_ptid (pid), status);
 
       save_errno = errno;
 
@@ -299,14 +298,6 @@ inf_ptrace_wait (ptid_t ptid, struct tar
   return pid_to_ptid (pid);
 }
 
-void
-inf_ptrace_post_wait (ptid_t ptid, int wait_status)
-{
-  /* This version of Unix doesn't require a meaningful "post wait"
-     operation.
-   */
-}
-
 /* Check to see if the given thread is alive.
 
    FIXME: Is kill() ever the right way to do this?  I doubt it, but
@@ -666,7 +657,6 @@ inf_ptrace_target (void)
   t->to_detach = inf_ptrace_detach;
   t->to_resume = inf_ptrace_resume;
   t->to_wait = inf_ptrace_wait;
-  t->to_post_wait = inf_ptrace_post_wait;
   t->to_prepare_to_store = inf_ptrace_prepare_to_store;
   t->to_xfer_memory = inf_ptrace_xfer_memory;
   t->to_xfer_partial = inf_ptrace_xfer_partial;
Index: infptrace.c
===================================================================
RCS file: /cvs/src/src/gdb/infptrace.c,v
retrieving revision 1.45
diff -p -u -r1.45 infptrace.c
--- infptrace.c	20 Sep 2004 16:39:33 -0000	1.45
+++ infptrace.c	29 Sep 2004 15:31:52 -0000
@@ -144,7 +144,6 @@ ptrace_wait (ptid_t ptid, int *status)
   int wstate;
 
   wstate = wait (status);
-  target_post_wait (pid_to_ptid (wstate), *status);
   return wstate;
 }
 
Index: inftarg.c
===================================================================
RCS file: /cvs/src/src/gdb/inftarg.c,v
retrieving revision 1.29
diff -p -u -r1.29 inftarg.c
--- inftarg.c	29 Sep 2004 14:20:25 -0000	1.29
+++ inftarg.c	29 Sep 2004 15:31:52 -0000
@@ -53,10 +53,6 @@ static void child_prepare_to_store (void
 static ptid_t child_wait (ptid_t, struct target_waitstatus *);
 #endif /* CHILD_WAIT */
 
-#if !defined(CHILD_POST_WAIT)
-void child_post_wait (ptid_t, int);
-#endif
-
 static void child_open (char *, int);
 
 static void child_files_info (struct target_ops *);
@@ -159,17 +155,6 @@ child_wait (ptid_t ptid, struct target_w
 }
 #endif /* CHILD_WAIT */
 
-#if !defined(CHILD_POST_WAIT)
-void
-child_post_wait (ptid_t ptid, int wait_status)
-{
-  /* This version of Unix doesn't require a meaningful "post wait"
-     operation.
-   */
-}
-#endif
-
-
 #ifndef CHILD_THREAD_ALIVE
 
 /* Check to see if the given thread is alive.
@@ -605,7 +590,6 @@ init_child_ops (void)
   child_ops.to_detach = child_detach;
   child_ops.to_resume = child_resume;
   child_ops.to_wait = child_wait;
-  child_ops.to_post_wait = child_post_wait;
   child_ops.to_fetch_registers = fetch_inferior_registers;
   child_ops.to_store_registers = store_inferior_registers;
   child_ops.to_prepare_to_store = child_prepare_to_store;
Index: infttrace.c
===================================================================
RCS file: /cvs/src/src/gdb/infttrace.c,v
retrieving revision 1.35
diff -p -u -r1.35 infttrace.c
--- infttrace.c	20 Sep 2004 16:39:33 -0000	1.35
+++ infttrace.c	29 Sep 2004 15:31:53 -0000
@@ -2888,9 +2888,6 @@ ptrace_wait (ptid_t ptid, int *status)
       *status = _SIGTRAP;
     }
 
-  target_post_wait (pid_to_ptid (tsp.tts_pid), *status);
-
-
 #ifdef THREAD_DEBUG
   if (debug_on)
     printf ("Done waiting, pid is %d, tid %d\n", real_pid, real_tid);
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.81
diff -p -u -r1.81 target.c
--- target.c	29 Sep 2004 13:54:32 -0000	1.81
+++ target.c	29 Sep 2004 15:31:54 -0000
@@ -385,7 +385,6 @@ update_current_target (void)
       INHERIT (to_disconnect, t);
       INHERIT (to_resume, t);
       INHERIT (to_wait, t);
-      INHERIT (to_post_wait, t);
       INHERIT (to_fetch_registers, t);
       INHERIT (to_store_registers, t);
       INHERIT (to_prepare_to_store, t);
@@ -487,9 +486,6 @@ update_current_target (void)
   de_fault (to_wait, 
 	    (ptid_t (*) (ptid_t, struct target_waitstatus *)) 
 	    noprocess);
-  de_fault (to_post_wait, 
-	    (void (*) (ptid_t, int)) 
-	    target_ignore);
   de_fault (to_fetch_registers, 
 	    (void (*) (int)) 
 	    target_ignore);
@@ -1747,15 +1743,6 @@ debug_to_wait (ptid_t ptid, struct targe
 }
 
 static void
-debug_to_post_wait (ptid_t ptid, int status)
-{
-  debug_target.to_post_wait (ptid, status);
-
-  fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n",
-		      PIDGET (ptid), status);
-}
-
-static void
 debug_print_register (const char * func, int regno)
 {
   fprintf_unfiltered (gdb_stdlog, "%s ", func);
@@ -2346,7 +2333,6 @@ setup_target_debug (void)
   current_target.to_disconnect = debug_to_disconnect;
   current_target.to_resume = debug_to_resume;
   current_target.to_wait = debug_to_wait;
-  current_target.to_post_wait = debug_to_post_wait;
   current_target.to_fetch_registers = debug_to_fetch_registers;
   current_target.to_store_registers = debug_to_store_registers;
   current_target.to_prepare_to_store = debug_to_prepare_to_store;
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.61
diff -p -u -r1.61 target.h
--- target.h	29 Sep 2004 13:54:33 -0000	1.61
+++ target.h	29 Sep 2004 15:31:55 -0000
@@ -304,7 +304,6 @@ struct target_ops
     void (*to_disconnect) (char *, int);
     void (*to_resume) (ptid_t, int, enum target_signal);
     ptid_t (*to_wait) (ptid_t, struct target_waitstatus *);
-    void (*to_post_wait) (ptid_t, int);
     void (*to_fetch_registers) (int);
     void (*to_store_registers) (int);
     void (*to_prepare_to_store) (void);
@@ -507,19 +506,6 @@ extern void target_disconnect (char *, i
 #define	target_wait(ptid, status)		\
      (*current_target.to_wait) (ptid, status)
 
-/* The target_wait operation waits for a process event to occur, and
-   thereby stop the process.
-
-   On some targets, certain events may happen in sequences.  gdb's
-   correct response to any single event of such a sequence may require
-   knowledge of what earlier events in the sequence have been seen.
-
-   This operation provides a target-specific hook that allows the
-   necessary bookkeeping to be performed to track such sequences.  */
-
-#define target_post_wait(ptid, status) \
-     (*current_target.to_post_wait) (ptid, status)
-
 /* Fetch at least register REGNO, or all regs if regno == -1.  No result.  */
 
 #define	target_fetch_registers(regno)	\
@@ -578,8 +564,6 @@ extern char *child_core_file_to_sym_file
 extern void child_post_attach (int);
 #endif
 
-extern void child_post_wait (ptid_t, int);
-
 extern void child_post_startup_inferior (ptid_t);
 
 extern void child_acknowledge_created_inferior (int);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]