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/target.h | |
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/target.h')
-rw-r--r-- | gdb/target.h | 48 |
1 files changed, 8 insertions, 40 deletions
diff --git a/gdb/target.h b/gdb/target.h index c804a9f..d9ed689 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -278,14 +278,10 @@ struct target_ops int (*to_remove_fork_catchpoint) (int); int (*to_insert_vfork_catchpoint) (int); int (*to_remove_vfork_catchpoint) (int); - int (*to_has_forked) (int, int *); - int (*to_has_vforked) (int, int *); void (*to_post_follow_vfork) (int, int, int, int); int (*to_insert_exec_catchpoint) (int); int (*to_remove_exec_catchpoint) (int); - int (*to_has_execd) (int, char **); int (*to_reported_exec_events_per_exec_call) (void); - int (*to_has_syscall_event) (int, enum target_waitkind *, int *); int (*to_has_exited) (int, int, int *); void (*to_mourn_inferior) (void); int (*to_can_run) (void); @@ -556,10 +552,6 @@ extern int child_insert_vfork_catchpoint (int); extern int child_remove_vfork_catchpoint (int); -extern int child_has_forked (int, int *); - -extern int child_has_vforked (int, int *); - extern void child_acknowledge_created_inferior (int); extern void child_post_follow_vfork (int, int, int, int); @@ -568,16 +560,20 @@ extern int child_insert_exec_catchpoint (int); extern int child_remove_exec_catchpoint (int); -extern int child_has_execd (int, char **); - extern int child_reported_exec_events_per_exec_call (void); -extern int child_has_syscall_event (int, enum target_waitkind *, int *); - extern int child_has_exited (int, int, int *); extern int child_thread_alive (ptid_t); +/* From infrun.c. */ + +extern int inferior_has_forked (int pid, int *child_pid); + +extern int inferior_has_vforked (int pid, int *child_pid); + +extern int inferior_has_execd (int pid, char **execd_pathname); + /* From exec.c */ extern void print_section_info (struct target_ops *, bfd *); @@ -742,20 +738,6 @@ extern void target_load (char *arg, int from_tty); #define target_remove_vfork_catchpoint(pid) \ (*current_target.to_remove_vfork_catchpoint) (pid) -/* Returns TRUE if PID has invoked the fork() system call. And, - also sets CHILD_PID to the process id of the other ("child") - inferior process that was created by that call. */ - -#define target_has_forked(pid,child_pid) \ - (*current_target.to_has_forked) (pid,child_pid) - -/* Returns TRUE if PID has invoked the vfork() system call. And, - also sets CHILD_PID to the process id of the other ("child") - inferior process that was created by that call. */ - -#define target_has_vforked(pid,child_pid) \ - (*current_target.to_has_vforked) (pid,child_pid) - /* An inferior process has been created via a vfork() system call. The debugger has followed the parent, the child, or both. The process of setting up for that follow may have required some @@ -777,13 +759,6 @@ extern void target_load (char *arg, int from_tty); #define target_remove_exec_catchpoint(pid) \ (*current_target.to_remove_exec_catchpoint) (pid) -/* Returns TRUE if PID has invoked a flavor of the exec() system call. - And, also sets EXECD_PATHNAME to the pathname of the executable - file that was passed to exec(), and is now being executed. */ - -#define target_has_execd(pid,execd_pathname) \ - (*current_target.to_has_execd) (pid,execd_pathname) - /* Returns the number of exec events that are reported when a process invokes a flavor of the exec() system call on this target, if exec events are being reported. */ @@ -791,13 +766,6 @@ extern void target_load (char *arg, int from_tty); #define target_reported_exec_events_per_exec_call() \ (*current_target.to_reported_exec_events_per_exec_call) () -/* Returns TRUE if PID has reported a syscall event. And, also sets - KIND to the appropriate TARGET_WAITKIND_, and sets SYSCALL_ID to - the unique integer ID of the syscall. */ - -#define target_has_syscall_event(pid,kind,syscall_id) \ - (*current_target.to_has_syscall_event) (pid,kind,syscall_id) - /* Returns TRUE if PID has exited. And, also sets EXIT_STATUS to the exit code of PID, if any. */ |