stop provides a nicer sequence of events for user and MI
notifications. */
ALL_THREADS_SAFE (th, tmp)
- if (th->ptid.pid () == pid && !ptid_equal (th->ptid, ptid))
+ if (th->ptid.pid () == pid && th->ptid != ptid)
delete_thread (th);
/* We also need to clear any left over stale state for the
static void
infrun_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid)
{
- struct displaced_step_inferior_state *displaced;
-
- if (ptid_equal (inferior_ptid, old_ptid))
+ if (inferior_ptid == old_ptid)
inferior_ptid = new_ptid;
}
we're about to resume, implicitly and explicitly. */
ALL_NON_EXITED_THREADS (tp)
{
- if (!ptid_match (tp->ptid, resume_ptid))
+ if (!tp->ptid.matches (resume_ptid))
continue;
clear_proceed_status_thread (tp);
}
}
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
{
struct inferior *inferior;
continue;
/* Ignore threads of processes we're not resuming. */
- if (!ptid_match (tp->ptid, resume_ptid))
+ if (!tp->ptid.matches (resume_ptid))
continue;
if (!thread_still_needs_step_over (tp))
ALL_NON_EXITED_THREADS (tp)
{
/* Ignore threads of processes we're not resuming. */
- if (!ptid_match (tp->ptid, resume_ptid))
+ if (!tp->ptid.matches (resume_ptid))
continue;
if (tp->resumed)
thread had been temporarily paused for some step-over), set up
for reporting the stop now. */
ALL_NON_EXITED_THREADS (tp)
- if (ptid_match (tp->ptid, ptid))
+ if (tp->ptid.matches (ptid))
{
if (tp->state != THREAD_RUNNING)
continue;
static void
infrun_thread_thread_exit (struct thread_info *tp, int silent)
{
- if (ptid_equal (target_last_wait_ptid, tp->ptid))
+ if (target_last_wait_ptid == tp->ptid)
nullify_last_target_wait_ptid ();
}
static void
for_each_just_stopped_thread (for_each_just_stopped_thread_callback_func func)
{
- if (!target_has_execution || ptid_equal (inferior_ptid, null_ptid))
+ if (!target_has_execution || inferior_ptid == null_ptid)
return;
if (target_is_non_stop_p ())
/* First see how many events we have. Count only resumed threads
that have an event pending. */
ALL_NON_EXITED_THREADS (event_tp)
- if (ptid_match (event_tp->ptid, waiton_ptid)
+ if (event_tp->ptid.matches (waiton_ptid)
&& event_tp->resumed
&& event_tp->suspend.waitstatus_pending_p)
num_events++;
/* Select the Nth thread that has had an event. */
ALL_NON_EXITED_THREADS (event_tp)
- if (ptid_match (event_tp->ptid, waiton_ptid)
+ if (event_tp->ptid.matches (waiton_ptid)
&& event_tp->resumed
&& event_tp->suspend.waitstatus_pending_p)
if (random_selector-- == 0)
/* First check if there is a resumed thread with a wait status
pending. */
- if (ptid_equal (ptid, minus_one_ptid) || ptid.is_pid ())
+ if (ptid == minus_one_ptid || ptid.is_pid ())
{
tp = random_pending_event_thread (ptid);
}
/* See if something interesting happened to the non-current thread. If
so, then switch to that thread. */
- if (!ptid_equal (ecs->ptid, inferior_ptid))
+ if (ecs->ptid != inferior_ptid)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: context switch\n");
static void
keep_going_pass_signal (struct execution_control_state *ecs)
{
- gdb_assert (ptid_equal (ecs->event_thread->ptid, inferior_ptid));
+ gdb_assert (ecs->event_thread->ptid == inferior_ptid);
gdb_assert (!ecs->event_thread->resumed);
/* Save the pc before execution, to compare with pc after stop. */
sc->ptid = inferior_ptid;
sc->inf_num = current_inferior ()->num;
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
{
/* Take a strong reference so that the thread can't be deleted
yet. */
static int
stop_context_changed (struct stop_context *prev)
{
- if (!ptid_equal (prev->ptid, inferior_ptid))
+ if (prev->ptid != inferior_ptid)
return 1;
if (prev->inf_num != current_inferior ()->num)
return 1;
/* Notify observers about the stop. This is where the interpreters
print the stop event. */
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
gdb::observers::normal_stop.notify (inferior_thread ()->control.stop_bpstat,
stop_print_frame);
else
void *ignore)
{
if (target_has_stack
- && !ptid_equal (inferior_ptid, null_ptid)
+ && inferior_ptid != null_ptid
&& gdbarch_get_siginfo_type_p (gdbarch))
{
struct type *type = gdbarch_get_siginfo_type (gdbarch);