diff options
author | Daniel Jacobowitz <drow@false.org> | 2002-11-16 19:22:59 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2002-11-16 19:22:59 +0000 |
commit | 47932f85ce27bcf18f485c2492dfafb02132dce9 (patch) | |
tree | f64276eec5b4178f035fc9e7f5d4476c18be0c61 /gdb/inftarg.c | |
parent | 4088142aaeb229390c53957ab465955725d43b17 (diff) | |
download | gdb-47932f85ce27bcf18f485c2492dfafb02132dce9.zip gdb-47932f85ce27bcf18f485c2492dfafb02132dce9.tar.gz gdb-47932f85ce27bcf18f485c2492dfafb02132dce9.tar.bz2 |
* breakpoint.c (bpstat_stop_status): Call inferior_has_forked,
inferior_has_vforked, and inferior_has_execd instead of
target_has_forked, target_has_vforked, and target_has_execd.
* config/pa/nm-hppah.h (CHILD_HAS_FORKED, CHILD_HAS_VFORKED)
(CHILD_HAS_EXECD, CHILD_HAS_SYSCALL_EVENT): Don't define.
(CHILD_WAIT): Define.
(child_wait): Add prototype.
* hppah-nat.c (hpux_has_forked): Rename from child_has_forked.
Add prototype.
(hpux_has_vforked): Likewise, from child_has_vforked.
(hpux_has_execd): Likewise, from child_has_execd.
(hpux_has_syscall_event): Likewise, from child_has_syscall_event.
(not_same_real_pid, child_wait): New, copied from inftarg.c.
Call hpux_has_forked, hpux_has_vforked, hpux_has_execd,
and hpux_has_syscall_event instead of the target hooks.
* infrun.c (inferior_has_forked, inferior_has_vforked)
(inferior_has_execd): New functions.
* inftarg.c (not_same_real_pid): Remove.
(child_wait): Remove references to not_same_real_pid,
target_has_forked, target_has_vforked, target_has_execd,
and target_has_syscall_event.
(child_has_forked, child_has_vforked, child_has_execd)
(child_has_syscall_event): Remove.
(init_child_ops): Remove references to child_has_forked,
child_has_vforked, child_has_execd, and child_has_syscall_event.
* infttrace.c (hpux_has_forked): Rename from child_has_forked.
(hpux_has_vforked): Likewise, from child_has_vforked.
(hpux_has_execd): Likewise, from child_has_execd.
(hpux_has_syscall_event): Likewise, from child_has_syscall_event.
* target.c (cleanup_target): Remove references to
to_has_forked, to_has_vforked, to_has_execd, and
to_has_syscall_event.
(update_current_target): Likewise.
(setup_target_debug): Likewise.
(debug_to_has_forked): Remove.
(debug_to_has_vforked): Remove.
(debug_to_has_execd): Remove.
(debug_to_has_syscall_event): Remove.
* target.h (struct target_ops): Remove to_has_forked.
to_has_vforked, to_has_execd, and to_has_syscall_event.
(child_has_forked, child_has_vforked, child_has_execd)
(child_has_syscall_event): Remove prototypes.
(inferior_has_forked, inferior_has_vforked, inferior_has_execd): Add
prototypes.
(target_has_forked, target_has_vforked, target_has_execd)
(target_has_syscall_event): Remove macros.
Diffstat (limited to 'gdb/inftarg.c')
-rw-r--r-- | gdb/inftarg.c | 112 |
1 files changed, 1 insertions, 111 deletions
diff --git a/gdb/inftarg.c b/gdb/inftarg.c index 31b196b..05445fe 100644 --- a/gdb/inftarg.c +++ b/gdb/inftarg.c @@ -104,16 +104,6 @@ int child_suppress_run = 0; /* Non-zero if inftarg should pretend not to #ifndef CHILD_WAIT -/*## */ -/* Enable HACK for ttrace work. In - * infttrace.c/require_notification_of_events, - * this is set to 0 so that the loop in child_wait - * won't loop. - */ -int not_same_real_pid = 1; -/*## */ - - /* Wait for child to do something. Return pid of child, or -1 in case of error; store status through argument pointer OURSTATUS. */ @@ -170,59 +160,7 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus) ourstatus->kind = TARGET_WAITKIND_SPURIOUS; return pid_to_ptid (pid); } - - if (target_has_forked (pid, &related_pid) - && ((pid == PIDGET (inferior_ptid)) - || (related_pid == PIDGET (inferior_ptid)))) - { - ourstatus->kind = TARGET_WAITKIND_FORKED; - ourstatus->value.related_pid = related_pid; - return pid_to_ptid (pid); - } - - if (target_has_vforked (pid, &related_pid) - && ((pid == PIDGET (inferior_ptid)) - || (related_pid == PIDGET (inferior_ptid)))) - { - ourstatus->kind = TARGET_WAITKIND_VFORKED; - ourstatus->value.related_pid = related_pid; - return pid_to_ptid (pid); - } - - if (target_has_execd (pid, &execd_pathname)) - { - /* Are we ignoring initial exec events? (This is likely because - we're in the process of starting up the inferior, and another - (older) mechanism handles those.) If so, we'll report this - as a regular stop, not an exec. - */ - if (inferior_ignoring_startup_exec_events) - { - inferior_ignoring_startup_exec_events--; - } - else - { - ourstatus->kind = TARGET_WAITKIND_EXECD; - ourstatus->value.execd_pathname = execd_pathname; - return pid_to_ptid (pid); - } - } - - /* All we must do with these is communicate their occurrence - to wait_for_inferior... - */ - if (target_has_syscall_event (pid, &kind, &syscall_id)) - { - ourstatus->kind = kind; - ourstatus->value.syscall_id = syscall_id; - return pid_to_ptid (pid); - } - - /*## } while (pid != PIDGET (inferior_ptid)); ## *//* Some other child died or stopped */ -/* hack for thread testing */ - } - while ((pid != PIDGET (inferior_ptid)) && not_same_real_pid); -/*## */ + } while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */ store_waitstatus (ourstatus, status); return pid_to_ptid (pid); @@ -552,27 +490,6 @@ child_remove_vfork_catchpoint (int pid) } #endif -#if !defined(CHILD_HAS_FORKED) -int -child_has_forked (int pid, int *child_pid) -{ - /* This version of Unix doesn't support notification of fork events. */ - return 0; -} -#endif - - -#if !defined(CHILD_HAS_VFORKED) -int -child_has_vforked (int pid, int *child_pid) -{ - /* This version of Unix doesn't support notification of vfork events. - */ - return 0; -} -#endif - - #if !defined(CHILD_POST_FOLLOW_VFORK) void child_post_follow_vfork (int parent_pid, int followed_parent, int child_pid, @@ -602,17 +519,6 @@ child_remove_exec_catchpoint (int pid) } #endif -#if !defined(CHILD_HAS_EXECD) -int -child_has_execd (int pid, char **execd_pathname) -{ - /* This version of Unix doesn't support notification of exec events. - */ - return 0; -} -#endif - - #if !defined(CHILD_REPORTED_EXEC_EVENTS_PER_EXEC_CALL) int child_reported_exec_events_per_exec_call (void) @@ -623,18 +529,6 @@ child_reported_exec_events_per_exec_call (void) } #endif - -#if !defined(CHILD_HAS_SYSCALL_EVENT) -int -child_has_syscall_event (int pid, enum target_waitkind *kind, int *syscall_id) -{ - /* This version of Unix doesn't support notification of syscall events. - */ - return 0; -} -#endif - - #if !defined(CHILD_HAS_EXITED) int child_has_exited (int pid, int wait_status, int *exit_status) @@ -774,14 +668,10 @@ init_child_ops (void) child_ops.to_remove_fork_catchpoint = child_remove_fork_catchpoint; child_ops.to_insert_vfork_catchpoint = child_insert_vfork_catchpoint; child_ops.to_remove_vfork_catchpoint = child_remove_vfork_catchpoint; - child_ops.to_has_forked = child_has_forked; - child_ops.to_has_vforked = child_has_vforked; child_ops.to_post_follow_vfork = child_post_follow_vfork; child_ops.to_insert_exec_catchpoint = child_insert_exec_catchpoint; child_ops.to_remove_exec_catchpoint = child_remove_exec_catchpoint; - child_ops.to_has_execd = child_has_execd; child_ops.to_reported_exec_events_per_exec_call = child_reported_exec_events_per_exec_call; - child_ops.to_has_syscall_event = child_has_syscall_event; child_ops.to_has_exited = child_has_exited; child_ops.to_mourn_inferior = child_mourn_inferior; child_ops.to_can_run = child_can_run; |