diff options
author | Pedro Alves <pedro@codesourcery.com> | 2008-07-09 22:23:05 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2008-07-09 22:23:05 +0000 |
commit | f3e2a00b870a77535da1873d3fc1ba2d73b350d0 (patch) | |
tree | f6fd9cd9d7dec9fdb6a2b7bb1d08c39448b02115 /gdb/target.h | |
parent | d065f280b0e34d3e76f483f1c8eb50dcb491eab9 (diff) | |
download | gdb-f3e2a00b870a77535da1873d3fc1ba2d73b350d0.tar.gz |
Adjust fork/vfork/exec to pass ptids around.
* target.h (struct target_waitstatus): Store related_pid as a ptid.
(inferior_has_forked, inferior_has_vforked, inferior_has_execd):
Take a ptid_t.
* breakpoint.h (struct breakpoint): Change forked_inferior_pid
type to ptid.
* breakpoint.c (print_it_typical, bpstat_check_location)
(print_one_breakpoint_location, set_raw_breakpoint_without_location)
(create_fork_vfork_event_catchpoint): Adjust.
* infrun.c (fork_event): Change parent_pid and child_pid types to
ptid.
(follow_exec, inferior_has_forked, inferior_has_vforked)
(inferior_has_execd): Take a ptid_t and don't trim it.
* linux-thread-db.c (thread_db_wait): Don't trim the returned ptid.
* linux-nat.c (linux_child_follow_fork): Adjust.
* inf-ptrace.c (inf_ptrace_wait): Adjust.
* inf-ttrace.c (inf_ttrace_wait): Adjust.
* win32-nat.c (get_win32_debug_event): Don't set related_pid.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/target.h b/gdb/target.h index a7b2bb9fa0d..db2d58e44c2 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -91,13 +91,13 @@ enum target_waitkind (e.g. it called load(2) on AIX). */ TARGET_WAITKIND_LOADED, - /* The program has forked. A "related" process' ID is in + /* The program has forked. A "related" process' PTID is in value.related_pid. I.e., if the child forks, value.related_pid is the parent's ID. */ TARGET_WAITKIND_FORKED, - /* The program has vforked. A "related" process's ID is in + /* The program has vforked. A "related" process's PTID is in value.related_pid. */ TARGET_WAITKIND_VFORKED, @@ -140,7 +140,7 @@ struct target_waitstatus { int integer; enum target_signal sig; - int related_pid; + ptid_t related_pid; char *execd_pathname; int syscall_id; } @@ -701,11 +701,11 @@ int target_write_memory_blocks (VEC(memory_write_request_s) *requests, /* From infrun.c. */ -extern int inferior_has_forked (int pid, int *child_pid); +extern int inferior_has_forked (ptid_t pid, ptid_t *child_pid); -extern int inferior_has_vforked (int pid, int *child_pid); +extern int inferior_has_vforked (ptid_t pid, ptid_t *child_pid); -extern int inferior_has_execd (int pid, char **execd_pathname); +extern int inferior_has_execd (ptid_t pid, char **execd_pathname); /* From exec.c */ |