diff options
Diffstat (limited to 'gdb/obsd-nat.c')
-rw-r--r-- | gdb/obsd-nat.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/obsd-nat.c b/gdb/obsd-nat.c index 890ec5ed670..c70820d60d0 100644 --- a/gdb/obsd-nat.c +++ b/gdb/obsd-nat.c @@ -90,7 +90,7 @@ obsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus, target_wait_flags options) { ptid_t wptid = inf_ptrace_target::wait (ptid, ourstatus, options); - if (ourstatus->kind == TARGET_WAITKIND_STOPPED) + if (ourstatus->kind () == TARGET_WAITKIND_STOPPED) { ptrace_state_t pe; @@ -103,8 +103,7 @@ obsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus, switch (pe.pe_report_event) { case PTRACE_FORK: - ourstatus->kind = TARGET_WAITKIND_FORKED; - ourstatus->value.related_pid = ptid_t (pe.pe_other_pid); + ourstatus->set_forked (ptid_t (pe.pe_other_pid)); /* Make sure the other end of the fork is stopped too. */ pid_t fpid = waitpid (pe.pe_other_pid, nullptr, 0); @@ -119,11 +118,11 @@ obsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus, gdb_assert (pe.pe_other_pid == pid); if (find_inferior_pid (this, fpid) != nullptr) { - ourstatus->value.related_pid = ptid_t (pe.pe_other_pid); + ourstatus->set_forked (ptid_t (pe.pe_other_pid)); wptid = ptid_t (fpid, pe.pe_tid, 0); } - obsd_enable_proc_events (ourstatus->value.related_pid.pid ()); + obsd_enable_proc_events (ourstatus->child_ptid ().pid ()); break; } |