From a182eed6e25da26d08047ce884748547da0c0b36 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Wed, 29 Sep 2004 15:33:02 +0000 Subject: [PATCH] 2004-09-29 Andrew Cagney * 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. --- gdb/ChangeLog | 16 ++++++++++++++++ gdb/inf-child.c | 8 -------- gdb/inf-ptrace.c | 10 ---------- gdb/infptrace.c | 1 - gdb/inftarg.c | 16 ---------------- gdb/infttrace.c | 3 --- gdb/target.c | 14 -------------- gdb/target.h | 16 ---------------- 8 files changed, 16 insertions(+), 68 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 231a97efd3e..1f7947f74be 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,21 @@ 2004-09-29 Andrew Cagney + * 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. + * wince.c (child_ops): Delete. * win32-nat.c (child_ops): Delete. diff --git a/gdb/inf-child.c b/gdb/inf-child.c index cb7b2ec04d9..ebc6c6243d2 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -52,13 +52,6 @@ inf_child_store_inferior_registers (int regnum) { } -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; diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index f0da8211a14..14b3f0a4964 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -256,7 +256,6 @@ inf_ptrace_wait (ptid_t ptid, struct target_waitstatus *ourstatus) 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 target_waitstatus *ourstatus) 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; diff --git a/gdb/infptrace.c b/gdb/infptrace.c index a9abbf2c39a..242872244ae 100644 --- a/gdb/infptrace.c +++ b/gdb/infptrace.c @@ -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; } diff --git a/gdb/inftarg.c b/gdb/inftarg.c index 3a9ed136c7e..72385760304 100644 --- a/gdb/inftarg.c +++ b/gdb/inftarg.c @@ -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_waitstatus *ourstatus) } #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; diff --git a/gdb/infttrace.c b/gdb/infttrace.c index 30e893c323b..96664d15ee4 100644 --- a/gdb/infttrace.c +++ b/gdb/infttrace.c @@ -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); diff --git a/gdb/target.c b/gdb/target.c index ab0f814746d..b3901149c98 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -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); @@ -1746,15 +1742,6 @@ debug_to_wait (ptid_t ptid, struct target_waitstatus *status) return retval; } -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) { @@ -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; diff --git a/gdb/target.h b/gdb/target.h index 4af479921a7..ab523c95fcc 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -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 *, int); #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 (char *); 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); -- 2.30.2