default_child_has_all_memory ()
{
/* If no inferior selected, then we can't read memory here. */
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
return 0;
return 1;
default_child_has_memory ()
{
/* If no inferior selected, then we can't read memory here. */
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
return 0;
return 1;
default_child_has_stack ()
{
/* If no inferior selected, there's no stack. */
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
return 0;
return 1;
default_child_has_registers ()
{
/* Can't read registers from no inferior. */
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
return 0;
return 1;
{
/* If there's no thread selected, then we can't make it run through
hoops. */
- if (ptid_equal (the_ptid, null_ptid))
+ if (the_ptid == null_ptid)
return 0;
return 1;
static ptid_t
default_get_ada_task_ptid (struct target_ops *self, long lwp, long tid)
{
- return ptid_build (ptid_get_pid (inferior_ptid), lwp, tid);
+ return ptid_t (inferior_ptid.pid (), lwp, tid);
}
static enum exec_direction_kind
bool
target_stack::unpush (target_ops *t)
{
- struct target_ops **cur;
- struct target_ops *tmp;
-
if (t->to_stratum == dummy_stratum)
internal_error (__FILE__, __LINE__,
_("Attempt to unpush the dummy target"));
first, so that if it fails, we don't write to the cache contents
that never made it to the target. */
if (writebuf != NULL
- && !ptid_equal (inferior_ptid, null_ptid)
+ && inferior_ptid != null_ptid
&& target_dcache_init_p ()
&& (stack_cache_enabled_p () || code_cache_enabled_p ()))
{
®ion))
return TARGET_XFER_E_IO;
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
inf = current_inferior ();
else
inf = NULL;
registers_changed_ptid (ptid);
/* We only set the internal executing state here. The user/frontend
- running state is set at a higher level. */
+ running state is set at a higher level. This also clears the
+ thread's stop_pc as side effect. */
set_executing (ptid, 1);
clear_inline_frame_state (ptid);
}
void
target_mourn_inferior (ptid_t ptid)
{
- gdb_assert (ptid_equal (ptid, inferior_ptid));
+ gdb_assert (ptid == inferior_ptid);
current_top_target ()->mourn_inferior ();
/* We no longer need to keep handles on any of the object files.
if (exec_file == NULL)
exec_file = "";
- pid = ptid_get_pid (inferior_ptid);
+ pid = inferior_ptid.pid ();
printf_unfiltered (_("Detaching from program: %s, %s\n"), exec_file,
- target_pid_to_str (pid_to_ptid (pid)));
+ target_pid_to_str (ptid_t (pid)));
gdb_flush (gdb_stdout);
}
{
static char buf[32];
- xsnprintf (buf, sizeof buf, "process %d", ptid_get_pid (ptid));
+ xsnprintf (buf, sizeof buf, "process %d", ptid.pid ());
return buf;
}