&& thread->stop_signal () == GDB_SIGNAL_0)
{
infrun_debug_printf ("resuming vfork parent thread %s",
- target_pid_to_str (thread->ptid).c_str ());
+ thread->ptid.to_string ().c_str ());
switch_to_thread (thread);
clear_proceed_status (0);
it is likely that it will return unavailable, so don't bother asking. */
displaced_debug_printf ("deferring step of %s",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
global_thread_step_over_chain_enqueue (tp);
return DISPLACED_STEP_PREPARE_STATUS_UNAVAILABLE;
}
displaced_debug_printf ("displaced-stepping %s now",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
scoped_restore_current_thread restore_thread;
if (status == DISPLACED_STEP_PREPARE_STATUS_CANT)
{
displaced_debug_printf ("failed to prepare (%s)",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
return DISPLACED_STEP_PREPARE_STATUS_CANT;
}
displaced_debug_printf ("not enough resources available, "
"deferring step of %s",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
global_thread_step_over_chain_enqueue (tp);
displaced_debug_printf ("prepared successfully thread=%s, "
"original_pc=%s, displaced_pc=%s",
- target_pid_to_str (tp->ptid).c_str (),
+ tp->ptid.to_string ().c_str (),
paddress (gdbarch, original_pc),
paddress (gdbarch, displaced_pc));
internal_error (__FILE__, __LINE__,
"[%s] has inconsistent state: "
"trap_expected=%d, resumed=%d, executing=%d\n",
- target_pid_to_str (tp->ptid).c_str (),
+ tp->ptid.to_string ().c_str (),
tp->control.trap_expected,
tp->resumed (),
tp->executing ());
}
infrun_debug_printf ("resuming [%s] for step-over",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
/* keep_going_pass_signal skips the step-over if the breakpoint
is no longer inserted. In all-stop, we want to keep looking
if (tp->resumed ())
{
infrun_debug_printf ("[%s] was resumed.",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
gdb_assert (!thread_is_in_step_over_chain (tp));
}
else
{
infrun_debug_printf ("[%s] was NOT resumed.",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
gdb_assert (thread_is_in_step_over_chain (tp));
}
infrun_debug_printf
("thread %s has pending wait "
"status %s (currently_stepping=%d).",
- target_pid_to_str (tp->ptid).c_str (),
+ tp->ptid.to_string ().c_str (),
target_waitstatus_to_string (&tp->pending_waitstatus ()).c_str (),
currently_stepping (tp));
{
warning (_("Couldn't deliver signal %s to %s."),
gdb_signal_to_name (sig),
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
}
tp->set_stop_signal (GDB_SIGNAL_0);
"current thread [%s] at %s",
step, gdb_signal_to_symbol_string (sig),
tp->control.trap_expected,
- target_pid_to_str (inferior_ptid).c_str (),
+ inferior_ptid.to_string ().c_str (),
paddress (gdbarch, pc));
/* Normally, by the time we reach `resume', the breakpoints are either
do displaced stepping. */
infrun_debug_printf ("resume: [%s] stepped breakpoint",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
tp->stepped_breakpoint = 1;
static void
clear_proceed_status_thread (struct thread_info *tp)
{
- infrun_debug_printf ("%s", target_pid_to_str (tp->ptid).c_str ());
+ infrun_debug_printf ("%s", tp->ptid.to_string ().c_str ());
/* If we're starting a new sequence, then the previous finished
single-step is no longer relevant. */
{
infrun_debug_printf ("pending event of %s was a finished step. "
"Discarding.",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
tp->clear_pending_waitstatus ();
tp->set_stop_reason (TARGET_STOPPED_BY_NO_REASON);
{
infrun_debug_printf
("thread %s has pending wait status %s (currently_stepping=%d).",
- target_pid_to_str (tp->ptid).c_str (),
+ tp->ptid.to_string ().c_str (),
target_waitstatus_to_string (&tp->pending_waitstatus ()).c_str (),
currently_stepping (tp));
}
gdb_assert (!thread_is_in_step_over_chain (tp));
infrun_debug_printf ("need to step-over [%s] first",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
global_thread_step_over_chain_enqueue (tp);
}
if (!tp->inf->has_execution ())
{
infrun_debug_printf ("[%s] target has no execution",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
continue;
}
if (tp->resumed ())
{
infrun_debug_printf ("[%s] resumed",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
gdb_assert (tp->executing () || tp->has_pending_waitstatus ());
continue;
}
if (thread_is_in_step_over_chain (tp))
{
infrun_debug_printf ("[%s] needs step-over",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
continue;
}
infrun_debug_printf ("resuming %s",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
reset_ecs (ecs, tp);
switch_to_thread (tp);
return nullptr;
}
- infrun_debug_printf ("Found %s.", target_pid_to_str (thread->ptid).c_str ());
+ infrun_debug_printf ("Found %s.", thread->ptid.to_string ().c_str ());
gdb_assert (thread->resumed ());
gdb_assert (thread->has_pending_waitstatus ());
else
{
infrun_debug_printf ("Waiting for specific thread %s.",
- target_pid_to_str (ptid).c_str ());
+ ptid.to_string ().c_str ());
/* We have a specific thread to check. */
tp = find_thread_ptid (inf, ptid);
if (pc != tp->stop_pc ())
{
infrun_debug_printf ("PC of %s changed. was=%s, now=%s",
- target_pid_to_str (tp->ptid).c_str (),
+ tp->ptid.to_string ().c_str (),
paddress (gdbarch, tp->stop_pc ()),
paddress (gdbarch, pc));
discard = 1;
else if (!breakpoint_inserted_here_p (regcache->aspace (), pc))
{
infrun_debug_printf ("previous breakpoint of %s, at %s gone",
- target_pid_to_str (tp->ptid).c_str (),
+ tp->ptid.to_string ().c_str (),
paddress (gdbarch, pc));
discard = 1;
if (discard)
{
infrun_debug_printf ("pending event of %s cancelled.",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
tp->clear_pending_waitstatus ();
target_waitstatus ws;
infrun_debug_printf ("Using pending wait status %s for %s.",
target_waitstatus_to_string
(&tp->pending_waitstatus ()).c_str (),
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
/* Now that we've selected our final event LWP, un-adjust its PC
if it was a software breakpoint (and the target doesn't
if (tp->inf == inf)
{
infrun_debug_printf ("removing thread %s from global step over chain",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
global_thread_step_over_chain_remove (tp);
}
|| ecs->event_thread != inferior_thread ()))
{
infrun_debug_printf ("Switching context from %s to %s",
- target_pid_to_str (inferior_ptid).c_str (),
- target_pid_to_str (ecs->ptid).c_str ());
+ inferior_ptid.to_string ().c_str (),
+ ecs->ptid.to_string ().c_str ());
}
switch_to_thread (ecs->event_thread);
{
infrun_debug_printf
("%s %s", target_waitstatus_to_string (&event.ws).c_str (),
- target_pid_to_str (event.ptid).c_str ());
+ event.ptid.to_string ().c_str ());
if (event.ws.kind () == TARGET_WAITKIND_NO_RESUMED)
{
gdb_assert (t != nullptr);
infrun_debug_printf
- ("using %s", target_pid_to_str (t->ptid).c_str ());
+ ("using %s", t->ptid.to_string ().c_str ());
}
else
{
/* Add it back to the step-over queue. */
infrun_debug_printf
("displaced-step of %s canceled",
- target_pid_to_str (t->ptid).c_str ());
+ t->ptid.to_string ().c_str ());
t->control.trap_expected = 0;
if (!t->inf->detaching)
infrun_debug_printf ("saved stop_pc=%s for %s "
"(currently_stepping=%d)",
paddress (target_gdbarch (), t->stop_pc ()),
- target_pid_to_str (t->ptid).c_str (),
+ t->ptid.to_string ().c_str (),
currently_stepping (t));
}
}
if (!t->stop_requested)
{
infrun_debug_printf (" %s executing, need stop",
- target_pid_to_str (t->ptid).c_str ());
+ t->ptid.to_string ().c_str ());
target_stop (t->ptid);
t->stop_requested = 1;
}
else
{
infrun_debug_printf (" %s executing, already stopping",
- target_pid_to_str (t->ptid).c_str ());
+ t->ptid.to_string ().c_str ());
}
if (t->stop_requested)
else
{
infrun_debug_printf (" %s not executing",
- target_pid_to_str (t->ptid).c_str ());
+ t->ptid.to_string ().c_str ());
/* The thread may be not executing, but still be
resumed with a pending status to process. */
if (tp->inf->detaching)
{
infrun_debug_printf ("restart threads: [%s] inferior detaching",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
continue;
}
if (tp == event_thread)
{
infrun_debug_printf ("restart threads: [%s] is event thread",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
continue;
}
if (!(tp->state == THREAD_RUNNING || tp->control.in_infcall))
{
infrun_debug_printf ("restart threads: [%s] not meant to be running",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
continue;
}
if (tp->resumed ())
{
infrun_debug_printf ("restart threads: [%s] resumed",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
gdb_assert (tp->executing () || tp->has_pending_waitstatus ());
continue;
}
if (thread_is_in_step_over_chain (tp))
{
infrun_debug_printf ("restart threads: [%s] needs step-over",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
gdb_assert (!tp->resumed ());
continue;
}
if (tp->has_pending_waitstatus ())
{
infrun_debug_printf ("restart threads: [%s] has pending status",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
tp->set_resumed (true);
continue;
}
internal_error (__FILE__, __LINE__,
"thread [%s] needs a step-over, but not in "
"step-over queue\n",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
}
if (currently_stepping (tp))
{
infrun_debug_printf ("restart threads: [%s] was stepping",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
keep_going_stepped_thread (tp);
}
else
struct execution_control_state *ecs = &ecss;
infrun_debug_printf ("restart threads: [%s] continuing",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
reset_ecs (ecs, tp);
switch_to_thread (tp);
keep_going_pass_signal (ecs);
infrun_debug_printf ("saved stop_pc=%s for %s "
"(currently_stepping=%d)",
paddress (target_gdbarch (), tp->stop_pc ()),
- target_pid_to_str (tp->ptid).c_str (),
+ tp->ptid.to_string ().c_str (),
currently_stepping (tp));
/* This in-line step-over finished; clear this so we won't
{
infrun_debug_printf ("[%s] hit another thread's single-step "
"breakpoint",
- target_pid_to_str (ecs->ptid).c_str ());
+ ecs->ptid.to_string ().c_str ());
ecs->hit_singlestep_breakpoint = 1;
}
}
else
{
infrun_debug_printf ("[%s] hit its single-step breakpoint",
- target_pid_to_str (ecs->ptid).c_str ());
+ ecs->ptid.to_string ().c_str ());
}
}
delete_just_stopped_threads_single_step_breakpoints ();
{
infrun_debug_printf
("need to finish step-over of [%s]",
- target_pid_to_str (ecs->event_thread->ptid).c_str ());
+ ecs->event_thread->ptid.to_string ().c_str ());
keep_going (ecs);
return true;
}
if (ecs->hit_singlestep_breakpoint)
{
infrun_debug_printf ("need to step [%s] over single-step breakpoint",
- target_pid_to_str (ecs->ptid).c_str ());
+ ecs->ptid.to_string ().c_str ());
keep_going (ecs);
return true;
}
{
infrun_debug_printf
("thread [%s] still needs step-over",
- target_pid_to_str (ecs->event_thread->ptid).c_str ());
+ ecs->event_thread->ptid.to_string ().c_str ());
keep_going (ecs);
return true;
}
infrun_debug_printf ("%s has trap_expected set, "
"resuming to collect trap",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
/* We haven't yet gotten our trap, and either: intercepted a
non-signal event (e.g., a fork); or took a signal which we
{
infrun_debug_printf ("step-over already in progress: "
"step-over for %s deferred",
- target_pid_to_str (tp->ptid).c_str ());
+ tp->ptid.to_string ().c_str ());
global_thread_step_over_chain_enqueue (tp);
}
else
- {
- infrun_debug_printf ("step-over in progress: resume of %s deferred",
- target_pid_to_str (tp->ptid).c_str ());
- }
+ infrun_debug_printf ("step-over in progress: resume of %s deferred",
+ tp->ptid.to_string ().c_str ());
}
else
{