diff options
author | Pedro Alves <palves@redhat.com> | 2008-07-09 22:23:05 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-07-09 22:23:05 +0000 |
commit | 3a3e9ee36f308152115225d25b59ac0cc2f35170 (patch) | |
tree | 80c0175248b732f52f5d6dda167dd92551ed000a /gdb/inf-ptrace.c | |
parent | 8ea051c51f64f1f720b12a7424c56ac31ff9a58b (diff) | |
download | gdb-3a3e9ee36f308152115225d25b59ac0cc2f35170.zip gdb-3a3e9ee36f308152115225d25b59ac0cc2f35170.tar.gz gdb-3a3e9ee36f308152115225d25b59ac0cc2f35170.tar.bz2 |
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/inf-ptrace.c')
-rw-r--r-- | gdb/inf-ptrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index e0c3ce9..e4f0d1d 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -398,7 +398,7 @@ inf_ptrace_wait (ptid_t ptid, struct target_waitstatus *ourstatus) { case PTRACE_FORK: ourstatus->kind = TARGET_WAITKIND_FORKED; - ourstatus->value.related_pid = pe.pe_other_pid; + ourstatus->value.related_pid = pid_to_ptid (pe.pe_other_pid); /* Make sure the other end of the fork is stopped too. */ fpid = waitpid (pe.pe_other_pid, &status, 0); @@ -413,7 +413,7 @@ inf_ptrace_wait (ptid_t ptid, struct target_waitstatus *ourstatus) gdb_assert (pe.pe_other_pid == pid); if (fpid == ptid_get_pid (inferior_ptid)) { - ourstatus->value.related_pid = pe.pe_other_pid; + ourstatus->value.related_pid = pid_to_ptid (pe.pe_other_pid); return pid_to_ptid (fpid); } |