if (print_inferior_events)
{
/* Ensure that we have a process ptid. */
- ptid_t process_ptid = ptid_t (ptid_get_pid (child_ptid));
+ ptid_t process_ptid = ptid_t (child_ptid.pid ());
target_terminal::ours_for_output ();
fprintf_filtered (gdb_stdlog,
struct inferior *parent_inf, *child_inf;
/* Add process to GDB's tables. */
- child_inf = add_inferior (ptid_get_pid (child_ptid));
+ child_inf = add_inferior (child_ptid.pid ());
parent_inf = current_inferior ();
child_inf->attach_flag = parent_inf->attach_flag;
/* Add the new inferior first, so that the target_detach below
doesn't unpush the target. */
- child_inf = add_inferior (ptid_get_pid (child_ptid));
+ child_inf = add_inferior (child_ptid.pid ());
parent_inf = current_inferior ();
child_inf->attach_flag = parent_inf->attach_flag;
if (print_inferior_events)
{
/* Ensure that we have a process ptid. */
- ptid_t process_ptid = ptid_t (ptid_get_pid (parent_ptid));
+ ptid_t process_ptid = ptid_t (parent_ptid.pid ());
target_terminal::ours_for_output ();
fprintf_filtered (gdb_stdlog,
{
struct thread_info *th, *tmp;
struct inferior *inf = current_inferior ();
- int pid = ptid_get_pid (ptid);
+ int pid = ptid.pid ();
ptid_t process_ptid;
/* This is an exec event that we actually wish to pay attention to.
stop provides a nicer sequence of events for user and MI
notifications. */
ALL_THREADS_SAFE (th, tmp)
- if (ptid_get_pid (th->ptid) == pid && !ptid_equal (th->ptid, ptid))
+ if (th->ptid.pid () == pid && !ptid_equal (th->ptid, ptid))
delete_thread (th);
/* We also need to clear any left over stale state for the
{
/* Resume all threads of the current process (and none of other
processes). */
- resume_ptid = ptid_t (ptid_get_pid (inferior_ptid));
+ resume_ptid = ptid_t (inferior_ptid.pid ());
}
else
{
is set. */
stb.printf ("infrun: target_wait (%d.%ld.%ld",
- ptid_get_pid (waiton_ptid),
+ waiton_ptid.pid (),
ptid_get_lwp (waiton_ptid),
ptid_get_tid (waiton_ptid));
- if (ptid_get_pid (waiton_ptid) != -1)
+ if (waiton_ptid.pid () != -1)
stb.printf (" [%s]", target_pid_to_str (waiton_ptid));
stb.printf (", status) =\n");
stb.printf ("infrun: %d.%ld.%ld [%s],\n",
- ptid_get_pid (result_ptid),
+ result_ptid.pid (),
ptid_get_lwp (result_ptid),
ptid_get_tid (result_ptid),
target_pid_to_str (result_ptid));
fprintf_unfiltered (gdb_stdlog,
"infrun: saving status %s for %d.%ld.%ld\n",
statstr.c_str (),
- ptid_get_pid (tp->ptid),
+ tp->ptid.pid (),
ptid_get_lwp (tp->ptid),
ptid_get_tid (tp->ptid));
}
"infrun: target_wait %s, saving "
"status for %d.%ld.%ld\n",
statstr.c_str (),
- ptid_get_pid (t->ptid),
+ t->ptid.pid (),
ptid_get_lwp (t->ptid),
ptid_get_tid (t->ptid));
}
process as not-executing so that finish_thread_state marks
them stopped (in the user's perspective) if/when we present
the stop to the user. */
- mark_ptid = ptid_t (ptid_get_pid (ecs->ptid));
+ mark_ptid = ptid_t (ecs->ptid.pid ());
}
else
mark_ptid = ecs->ptid;
/* Ignore threads of processes the caller is not
resuming. */
if (!sched_multi
- && ptid_get_pid (tp->ptid) != ptid_get_pid (ecs->ptid))
+ && tp->ptid.pid () != ecs->ptid.pid ())
continue;
/* When stepping over a breakpoint, we lock all threads