Remove ptid_equal in favor of using "==".
gdb/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* common/ptid.c (ptid_equal): Remove.
* common/ptid.h (ptid_equal): Don't declare.
* ada-tasks.c: Update.
* breakpoint.c: Update.
* common/agent.c: Update.
* corelow.c: Update.
* darwin-nat-info.c: Update.
* darwin-nat.c: Update.
* dcache.c: Update.
* dtrace-probe.c: Update.
* dummy-frame.c: Update.
* fbsd-nat.c: Update.
* frame.c: Update.
* gdbthread.h: Update.
* gnu-nat.c: Update.
* go32-nat.c: Update.
* inf-loop.c: Update.
* inf-ptrace.c: Update.
* infcall.c: Update.
* infcmd.c: Update.
* inflow.c: Update.
* infrun.c: Update.
* linux-fork.c: Update.
* linux-nat.c: Update.
* linux-thread-db.c: Update.
* mi/mi-cmd-var.c: Update.
* mi/mi-interp.c: Update.
* mi/mi-main.c: Update.
* nto-procfs.c: Update.
* ppc-linux-tdep.c: Update.
* procfs.c: Update.
* python/py-inferior.c: Update.
* python/py-record-btrace.c: Update.
* python/py-record.c: Update.
* ravenscar-thread.c: Update.
* regcache.c: Update.
* remote-sim.c: Update.
* remote.c: Update.
* sol-thread.c: Update.
* solib.c: Update.
* target.c: Update.
* tui/tui-stack.c: Update.
* varobj.c: Update.
* windows-nat.c: Update.
* windows-tdep.c: Update.
gdb/gdbserver/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* linux-low.c: Update.
* lynx-low.c: Update.
* mem-break.c: Update.
* nto-low.c: Update.
* remote-utils.c: Update.
* server.c: Update.
* spu-low.c: Update.
* target.c: Update.
* win32-low.c: Update.
+2018-07-03 Tom Tromey <tom@tromey.com>
+
+ * common/ptid.c (ptid_equal): Remove.
+ * common/ptid.h (ptid_equal): Don't declare.
+ * ada-tasks.c: Update.
+ * breakpoint.c: Update.
+ * common/agent.c: Update.
+ * corelow.c: Update.
+ * darwin-nat-info.c: Update.
+ * darwin-nat.c: Update.
+ * dcache.c: Update.
+ * dtrace-probe.c: Update.
+ * dummy-frame.c: Update.
+ * fbsd-nat.c: Update.
+ * frame.c: Update.
+ * gdbthread.h: Update.
+ * gnu-nat.c: Update.
+ * go32-nat.c: Update.
+ * inf-loop.c: Update.
+ * inf-ptrace.c: Update.
+ * infcall.c: Update.
+ * infcmd.c: Update.
+ * inflow.c: Update.
+ * infrun.c: Update.
+ * linux-fork.c: Update.
+ * linux-nat.c: Update.
+ * linux-thread-db.c: Update.
+ * mi/mi-cmd-var.c: Update.
+ * mi/mi-interp.c: Update.
+ * mi/mi-main.c: Update.
+ * nto-procfs.c: Update.
+ * ppc-linux-tdep.c: Update.
+ * procfs.c: Update.
+ * python/py-inferior.c: Update.
+ * python/py-record-btrace.c: Update.
+ * python/py-record.c: Update.
+ * ravenscar-thread.c: Update.
+ * regcache.c: Update.
+ * remote-sim.c: Update.
+ * remote.c: Update.
+ * sol-thread.c: Update.
+ * solib.c: Update.
+ * target.c: Update.
+ * tui/tui-stack.c: Update.
+ * varobj.c: Update.
+ * windows-nat.c: Update.
+ * windows-tdep.c: Update.
+
2018-07-03 Tom Tromey <tom@tromey.com>
* common/ptid.c (ptid_match): Remove.
data = get_ada_tasks_inferior_data (inf);
for (i = 0; i < VEC_length (ada_task_info_s, data->task_list); i++)
- if (ptid_equal (VEC_index (ada_task_info_s, data->task_list, i)->ptid,
- thread->ptid))
+ if (VEC_index (ada_task_info_s, data->task_list, i)->ptid == thread->ptid)
return i + 1;
return 0; /* No matching task found. */
for (i = 0; i < nb_tasks; i++)
{
task = VEC_index (ada_task_info_s, data->task_list, i);
- if (ptid_equal (task->ptid, ptid))
+ if (task->ptid == ptid)
return task;
}
/* Print a star if this task is the current task (or the task
currently selected). */
- if (ptid_equal (task_info->ptid, inferior_ptid))
+ if (task_info->ptid == inferior_ptid)
uiout->field_string ("current", "*");
else
uiout->field_skip ("current");
watchpoint_in_thread_scope (struct watchpoint *b)
{
return (b->pspace == current_program_space
- && (ptid_equal (b->watchpoint_thread, null_ptid)
- || (ptid_equal (inferior_ptid, b->watchpoint_thread)
+ && (b->watchpoint_thread == null_ptid
+ || (inferior_ptid == b->watchpoint_thread
&& !inferior_thread ()->executing)));
}
if we aren't attached to any process yet, we should still
insert breakpoints. */
if (!gdbarch_has_global_breakpoints (target_gdbarch ())
- && ptid_equal (inferior_ptid, null_ptid))
+ && inferior_ptid == null_ptid)
continue;
val = insert_bp_location (bl, &tmp_error_stream, &disabled_breaks,
if we aren't attached to any process yet, we should still
insert breakpoints. */
if (!gdbarch_has_global_breakpoints (target_gdbarch ())
- && ptid_equal (inferior_ptid, null_ptid))
+ && inferior_ptid == null_ptid)
continue;
val = insert_bp_location (bl, &tmp_error_stream, &disabled_breaks,
static void
breakpoint_about_to_proceed (void)
{
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
{
struct thread_info *tp = inferior_thread ();
uiout->field_skip ("addr");
annotate_field (5);
uiout->text ("fork");
- if (!ptid_equal (c->forked_inferior_pid, null_ptid))
+ if (c->forked_inferior_pid != null_ptid)
{
uiout->text (", process ");
uiout->field_int ("what", c->forked_inferior_pid.pid ());
uiout->field_skip ("addr");
annotate_field (5);
uiout->text ("vfork");
- if (!ptid_equal (c->forked_inferior_pid, null_ptid))
+ if (c->forked_inferior_pid != null_ptid)
{
uiout->text (", process ");
uiout->field_int ("what", c->forked_inferior_pid.pid ());
return -1;
/* Need to read response with the inferior stopped. */
- if (!ptid_equal (ptid, null_ptid))
+ if (ptid != null_ptid)
{
/* Stop thread PTID. */
DEBUG_AGENT ("agent: stop helper thread\n");
ptid_t null_ptid = ptid_t::make_null ();
ptid_t minus_one_ptid = ptid_t::make_minus_one ();
-
-/* See ptid.h. */
-
-int
-ptid_equal (const ptid_t &ptid1, const ptid_t &ptid2)
-{
- return ptid1 == ptid2;
-}
extern ptid_t minus_one_ptid;
-
-/* The following functions are kept for backwards compatibility. The use of
- the ptid_t methods is preferred. */
-
-/* See ptid_t::operator== and ptid_t::operator!=. */
-
-extern int ptid_equal (const ptid_t &ptid1, const ptid_t &ptid2);
-
#endif
bfd_map_over_sections (core_bfd, add_to_thread_list,
bfd_get_section_by_name (core_bfd, ".reg"));
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
{
/* Either we found no .reg/NN section, and hence we have a
non-threaded core (single-threaded, from gdb's perspective),
if (args == NULL || *args == 0)
{
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
printf_unfiltered (_("No inferior running\n"));
darwin_inferior *priv = get_darwin_inferior (current_inferior ());
printf_unfiltered (_(" gdb-exception"));
else if (port == darwin_port_set)
printf_unfiltered (_(" gdb-port_set"));
- else if (!ptid_equal (inferior_ptid, null_ptid))
+ else if (inferior_ptid != null_ptid)
{
struct inferior *inf = current_inferior ();
darwin_inferior *priv = get_darwin_inferior (inf);
}
address = value_as_address (val);
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
error (_("Inferior not available"));
inf = current_inferior ();
{
if (strcmp (args, "saved") == 0)
{
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
printf_unfiltered (_("No inferior running\n"));
darwin_inferior *priv = get_darwin_inferior (current_inferior ());
{
struct inferior *inf;
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
printf_unfiltered (_("No inferior running\n"));
inf = current_inferior ();
ptid = inferior_ptid;
/* minus_one_ptid is RESUME_ALL. */
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
{
struct resume_inferior_threads_param param;
darwin_dump_message (hdr, darwin_debug_flag > 11);
res = darwin_decode_message (hdr, &thread, &inf, status);
- if (ptid_equal (res, minus_one_ptid))
+ if (res == minus_one_ptid)
continue;
/* Early return in case an inferior has exited. */
int status;
int res;
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
return;
gdb_assert (inf != NULL);
set_enable_mach_exceptions (const char *args, int from_tty,
struct cmd_list_element *c)
{
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
{
struct inferior *inf = current_inferior ();
darwin_inferior *priv = get_darwin_inferior (inf);
/* If this is a different inferior from what we've recorded,
flush the cache. */
- if (! ptid_equal (inferior_ptid, dcache->ptid))
+ if (inferior_ptid != dcache->ptid)
{
dcache_invalidate (dcache);
dcache->ptid = inferior_ptid;
dcache ? (unsigned) dcache->line_size
: dcache_line_size);
- if (dcache == NULL || ptid_equal (dcache->ptid, null_ptid))
+ if (dcache == NULL || dcache->ptid == null_ptid)
{
printf_filtered (_("No data cache available.\n"));
return;
/* Enabling a dtrace probe implies patching the text section of the
running process, so make sure the inferior is indeed running. */
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
error (_("No inferior running"));
/* Fast path. */
/* Disabling a dtrace probe implies patching the text section of the
running process, so make sure the inferior is indeed running. */
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
error (_("No inferior running"));
/* Fast path. */
pid_t pid;
/* Don't PT_CONTINUE a process which has a pending vfork done event. */
- if (ptid_equal (minus_one_ptid, ptid))
+ if (minus_one_ptid == ptid)
pid = inferior_ptid.pid ();
else
pid = ptid.pid ();
{
#ifndef PTRACE_VFORK
wptid = fbsd_next_vfork_done ();
- if (!ptid_equal (wptid, null_ptid))
+ if (wptid != null_ptid)
{
ourstatus->kind = TARGET_WAITKIND_VFORK_DONE;
return wptid;
/* Make sure the other end of the fork is stopped too. */
child_ptid = fbsd_is_child_pending (child);
- if (ptid_equal (child_ptid, null_ptid))
+ if (child_ptid == null_ptid)
{
pid = waitpid (child, &status, 0);
if (pid == -1)
+2018-07-03 Tom Tromey <tom@tromey.com>
+
+ * linux-low.c: Update.
+ * lynx-low.c: Update.
+ * mem-break.c: Update.
+ * nto-low.c: Update.
+ * remote-utils.c: Update.
+ * server.c: Update.
+ * spu-low.c: Update.
+ * target.c: Update.
+ * win32-low.c: Update.
+
2018-07-03 Tom Tromey <tom@tromey.com>
* server.c: Update.
/* Check for a lwp with a pending status. */
- if (ptid_equal (filter_ptid, minus_one_ptid) || filter_ptid.is_pid ())
+ if (filter_ptid == minus_one_ptid || filter_ptid.is_pid ())
{
event_thread = find_thread_in_random ([&] (thread_info *thread)
{
if (debug_threads && event_thread)
debug_printf ("Got a pending child %ld\n", lwpid_of (event_thread));
}
- else if (!ptid_equal (filter_ptid, null_ptid))
+ else if (filter_ptid != null_ptid)
{
requested_child = find_lwp_pid (filter_ptid);
else
any_resumed = 0;
- if (ptid_equal (step_over_bkpt, null_ptid))
+ if (step_over_bkpt == null_ptid)
pid = linux_wait_for_event (ptid, &w, options);
else
{
if it's not the single_step_breakpoint we are hitting.
This avoids that a program would keep trapping a permanent breakpoint
forever. */
- if (!ptid_equal (step_over_bkpt, null_ptid)
+ if (step_over_bkpt != null_ptid
&& event_child->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT
&& (event_child->stepping
|| !single_step_breakpoint_inserted_here (event_child->stop_pc)))
from among those that have had events. Giving equal priority
to all LWPs that have had events helps prevent
starvation. */
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
{
event_child->status_pending_p = 1;
event_child->status_pending = w;
ourstatus->value.sig = gdb_signal_from_host (WSTOPSIG (w));
}
- gdb_assert (ptid_equal (step_over_bkpt, null_ptid));
+ gdb_assert (step_over_bkpt == null_ptid);
if (debug_threads)
{
event_ptid = linux_wait_1 (ptid, ourstatus, target_options);
}
while ((target_options & TARGET_WNOHANG) == 0
- && ptid_equal (event_ptid, null_ptid)
+ && event_ptid == null_ptid
&& ourstatus->kind == TARGET_WAITKIND_IGNORE);
/* If at least one stop was reported, there may be more. A single
SIGCHLD can signal more than one child stop. */
if (target_is_async_p ()
&& (target_options & TARGET_WNOHANG) != 0
- && !ptid_equal (event_ptid, null_ptid))
+ && event_ptid != null_ptid)
async_file_mark ();
return event_ptid;
for (int ndx = 0; ndx < n; ndx++)
{
ptid_t ptid = resume[ndx].thread;
- if (ptid_equal (ptid, minus_one_ptid)
+ if (ptid == minus_one_ptid
|| ptid == thread->id
/* Handle both 'pPID' and 'pPID.-1' as meaning 'all threads
of PID'. */
static void
complete_ongoing_step_over (void)
{
- if (!ptid_equal (step_over_bkpt, null_ptid))
+ if (step_over_bkpt != null_ptid)
{
struct lwp_info *lwp;
int wstat;
LynxOS 178 is a little more sensitive, and triggers some
unexpected signals (Eg SIG61) when we resume the inferior
using a different thread. */
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
ptid = current_process()->priv->last_wait_event_ptid;
/* The ptid might still be minus_one_ptid; this can happen between
the moment we create the inferior or attach to a process, and
the moment we resume its execution for the first time. It is
fine to use the current_thread's ptid in those cases. */
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
ptid = ptid_of (current_thread);
regcache_invalidate_pid (ptid.pid ());
int wstat;
ptid_t new_ptid;
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
pid = lynx_ptid_get_pid (ptid_of (current_thread));
else
pid = BUILDPID (lynx_ptid_get_pid (ptid), lynx_ptid_get_tid (ptid));
while (bp)
{
if (bp->type == single_step_breakpoint
- && ptid_equal (((struct single_step_breakpoint *) bp)->ptid,
- ptid_of (thread)))
+ && ((struct single_step_breakpoint *) bp)->ptid == ptid_of (thread))
{
struct thread_info *saved_thread = current_thread;
for (bp = proc->breakpoints; bp != NULL; bp = bp->next)
{
if (bp->type == single_step_breakpoint
- && ptid_equal (((struct single_step_breakpoint *) bp)->ptid,
- ptid_of (thread)))
+ && ((struct single_step_breakpoint *) bp)->ptid == ptid_of (thread))
{
gdb_assert (bp->raw->inserted > 0);
while (bp)
{
if (bp->type == single_step_breakpoint
- && ptid_equal (((struct single_step_breakpoint *) bp)->ptid,
- ptid_of (thread)))
+ && ((struct single_step_breakpoint *) bp)->ptid == ptid_of (thread))
return 1;
else
{
for (bp = proc->breakpoints; bp != NULL; bp = bp->next)
{
if (bp->type == single_step_breakpoint
- && ptid_equal (((struct single_step_breakpoint *) bp)->ptid,
- ptid_of (thread)))
+ && ((struct single_step_breakpoint *) bp)->ptid == ptid_of (thread))
{
gdb_assert (bp->raw->inserted > 0);
TRACE ("%s pid: %d tid: %ld\n", __func__, ptid.pid (),
ptid.lwp ());
if (nto_inferior.ctl_fd != -1
- && !ptid_equal (ptid, null_ptid)
- && !ptid_equal (ptid, minus_one_ptid))
+ && ptid != null_ptid
+ && ptid != minus_one_ptid)
{
pthread_t tid = ptid.lwp ();
in GDB will claim this event belongs to inferior_ptid
if we do not specify a thread, and there's no way for
gdbserver to know what inferior_ptid is. */
- if (1 || !ptid_equal (cs.general_thread, ptid))
+ if (1 || cs.general_thread != ptid)
{
int core = -1;
/* In non-stop, don't change the general thread behind
op = own_buf + strlen ("Qbtrace:");
- if (ptid_equal (cs.general_thread, null_ptid)
- || ptid_equal (cs.general_thread, minus_one_ptid))
+ if (cs.general_thread == null_ptid
+ || cs.general_thread == minus_one_ptid)
{
strcpy (own_buf, "E.Must select a single thread.");
return -1;
op = own_buf + strlen ("Qbtrace-conf:");
- if (ptid_equal (cs.general_thread, null_ptid)
- || ptid_equal (cs.general_thread, minus_one_ptid))
+ if (cs.general_thread == null_ptid
+ || cs.general_thread == minus_one_ptid)
{
strcpy (own_buf, "E.Must select a single thread.");
return -1;
if (writebuf != NULL)
return -2;
- if (ptid_equal (cs.general_thread, null_ptid)
- || ptid_equal (cs.general_thread, minus_one_ptid))
+ if (cs.general_thread == null_ptid
+ || cs.general_thread == minus_one_ptid)
{
strcpy (cs.own_buf, "E.Must select a single thread.");
return -3;
if (annex[0] != '\0')
return -1;
- if (ptid_equal (cs.general_thread, null_ptid)
- || ptid_equal (cs.general_thread, minus_one_ptid))
+ if (cs.general_thread == null_ptid
+ || cs.general_thread == minus_one_ptid)
{
strcpy (cs.own_buf, "E.Must select a single thread.");
return -3;
{
const struct thread_resume *action = &actions[i];
- if (ptid_equal (action->thread, minus_one_ptid)
- || ptid_equal (action->thread, thread->id)
+ if (action->thread == minus_one_ptid
+ || action->thread == thread->id
|| ((action->thread.pid ()
== thread->id.pid ())
&& action->thread.lwp () == -1))
int n = 0;
int valid_cont_thread;
- valid_cont_thread = (!ptid_equal (cs.cont_thread, null_ptid)
- && !ptid_equal (cs.cont_thread, minus_one_ptid));
+ valid_cont_thread = (cs.cont_thread != null_ptid
+ && cs.cont_thread != minus_one_ptid);
if (step || sig || valid_cont_thread)
{
if (cs.own_buf[1] == 'g')
{
- if (ptid_equal (thread_id, null_ptid))
+ if (thread_id == null_ptid)
{
/* GDB is telling us to choose any thread. Check if
the currently selected thread is still valid. If
static int
spu_thread_alive (ptid_t ptid)
{
- return ptid_equal (ptid, current_ptid);
+ return ptid == current_ptid;
}
/* Resume process. */
size_t i;
for (i = 0; i < n; i++)
- if (ptid_equal (resume_info[i].thread, minus_one_ptid)
- || ptid_equal (resume_info[i].thread, ptid_of (thr)))
+ if (resume_info[i].thread == minus_one_ptid
+ || resume_info[i].thread == ptid_of (thr))
break;
if (i == n)
{
static char buf[80];
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
xsnprintf (buf, sizeof (buf), "<all threads>");
- else if (ptid_equal (ptid, null_ptid))
+ else if (ptid == null_ptid)
xsnprintf (buf, sizeof (buf), "<null thread>");
else if (ptid.tid () != 0)
xsnprintf (buf, sizeof (buf), "Thread %d.0x%lx",
/* This handles the very limited set of resume packets that GDB can
currently produce. */
- if (n == 1 && ptid_equal (resume_info[0].thread, minus_one_ptid))
+ if (n == 1 && resume_info[0].thread == minus_one_ptid)
tid = -1;
else if (n > 1)
tid = -1;
the Windows resume code do the right thing for thread switching. */
tid = current_event.dwThreadId;
- if (!ptid_equal (resume_info[0].thread, minus_one_ptid))
+ if (resume_info[0].thread != minus_one_ptid)
{
sig = gdb_signal_from_host (resume_info[0].sig);
step = resume_info[0].kind == resume_step;
{
/* If this is the current thread, or there's code out there that
relies on it existing (refcount > 0) we can't delete yet. */
- return (refcount () == 0 && !ptid_equal (ptid, inferior_ptid));
+ return (refcount () == 0 && ptid != inferior_ptid);
}
/* Mark this thread as running and notify observers. */
/* Tell GDB's generic thread code. */
- if (ptid_equal (inferior_ptid, ptid_t (inf->pid)))
+ if (inferior_ptid == ptid_t (inf->pid))
/* This is the first time we're hearing about thread
ids, after a fork-child. */
thread_change_ptid (inferior_ptid, ptid);
thread = inf->wait.thread;
if (thread)
ptid = ptid_t (inf->pid, thread->tid, 0);
- else if (ptid_equal (ptid, minus_one_ptid))
+ else if (ptid == minus_one_ptid)
thread = inf_tid_to_thread (inf, -1);
else
thread = inf_tid_to_thread (inf, ptid.lwp ());
}
if (thread
- && !ptid_equal (ptid, minus_one_ptid)
+ && ptid != minus_one_ptid
&& status->kind != TARGET_WAITKIND_SPURIOUS
&& inf->pause_sc == 0 && thread->pause_sc == 0)
/* If something actually happened to THREAD, make sure we
inf_update_procs (inf);
/* A specific PTID means `step only this process id'. */
- resume_all = ptid_equal (ptid, minus_one_ptid);
+ resume_all = ptid == minus_one_ptid;
if (resume_all)
/* Allow all threads to run, except perhaps single-stepping one. */
bool
go32_nat_target::thread_alive (ptid_t ptid)
{
- return !ptid_equal (ptid, null_ptid);
+ return ptid != null_ptid;
}
const char *
/* Do all continuations associated with the whole inferior (not
a particular thread). */
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
do_all_inferior_continuations (0);
/* When running a command list (from a user command, say), these
pid_t pid;
int request;
- if (ptid_equal (minus_one_ptid, ptid))
+ if (minus_one_ptid == ptid)
/* Resume all threads. Traditionally ptrace() only supports
single-threaded processes, so simply resume the inferior. */
pid = inferior_ptid.pid ();
name);
}
- if (! ptid_equal (call_thread_ptid, inferior_ptid))
+ if (call_thread_ptid != inferior_ptid)
{
const char *name = get_function_name (funaddr,
name_buf, sizeof (name_buf));
static void
kill_if_already_running (int from_tty)
{
- if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
+ if (inferior_ptid != null_ptid && target_has_execution)
{
/* Bail out before killing the program if we will not be able to
restart it. */
ALL_NON_EXITED_THREADS (tp)
{
- if (ptid_equal (tp->ptid, inferior_ptid))
+ if (tp->ptid == inferior_ptid)
continue;
if (!tp->ptid.matches (resume_ptid))
continue;
It should be a distinct flag that indicates that a target is active, cuz
some targets don't have processes! */
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
error (_("The program is not being run."));
if (!query (_("Kill the program being debugged? ")))
error (_("Not confirmed."));
{
dont_repeat (); /* Not for the faint of heart. */
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
error (_("The program is not being run."));
query_if_trace_running (from_tty);
return;
}
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
return;
inf = current_inferior ();
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
{
struct displaced_step_inferior_state *displaced;
- if (ptid_equal (inferior_ptid, old_ptid))
+ if (inferior_ptid == old_ptid)
inferior_ptid = new_ptid;
}
}
}
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
{
struct inferior *inferior;
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 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);
linux_target->low_forget_process (ptid.pid ());
for (fp = fork_list; fp; fpprev = fp, fp = fp->next)
- if (ptid_equal (fp->ptid, ptid))
+ if (fp->ptid == ptid)
break;
if (!fp)
remove it, leaving the list empty -- we're now down to the
default case of debugging a single process. */
if (fork_list != NULL && fork_list->next == NULL &&
- ptid_equal (fork_list->ptid, inferior_ptid))
+ fork_list->ptid == inferior_ptid)
{
/* Last fork -- delete from list and handle as solo process
(should be a safe recursion). */
struct fork_info *fp;
for (fp = fork_list; fp; fp = fp->next)
- if (ptid_equal (fp->ptid, ptid))
+ if (fp->ptid == ptid)
return fp;
return NULL;
struct cleanup *old_cleanup;
int ret = -1;
- if (!ptid_equal (pptid, inferior_ptid))
+ if (pptid != inferior_ptid)
{
/* Switch to pptid. */
oldfp = find_fork_ptid (inferior_ptid);
error (_("Requires argument (checkpoint id to delete)"));
ptid = fork_id_to_ptid (parse_and_eval_long (args));
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
error (_("No such checkpoint id, %s"), args);
- if (ptid_equal (ptid, inferior_ptid))
+ if (ptid == inferior_ptid)
error (_("\
Please switch to another checkpoint before deleting the current one"));
error (_("Requires argument (checkpoint id to detach)"));
ptid = fork_id_to_ptid (parse_and_eval_long (args));
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
error (_("No such checkpoint id, %s"), args);
- if (ptid_equal (ptid, inferior_ptid))
+ if (ptid == inferior_ptid)
error (_("\
Please switch to another checkpoint before detaching the current one"));
continue;
printed = fp;
- if (ptid_equal (fp->ptid, inferior_ptid))
+ if (fp->ptid == inferior_ptid)
printf_filtered ("* ");
else
printf_filtered (" ");
target_pid_to_str (inferior_ptid));
/* A specific PTID means `step only this process id'. */
- resume_many = (ptid_equal (minus_one_ptid, ptid)
+ resume_many = (minus_one_ptid == ptid
|| ptid.is_pid ());
/* Mark the lwps we're resuming as resumed. */
/* If we're not waiting for a specific LWP, choose an event LWP from
among those that have had events. Giving equal priority to all
LWPs that have had events helps prevent starvation. */
- if (ptid_equal (ptid, minus_one_ptid) || ptid.is_pid ())
+ if (ptid == minus_one_ptid || ptid.is_pid ())
select_event_lwp (ptid, &lp, &status);
gdb_assert (lp != NULL);
if (target_is_async_p ()
&& ((ourstatus->kind != TARGET_WAITKIND_IGNORE
&& ourstatus->kind != TARGET_WAITKIND_NO_RESUMED)
- || !ptid_equal (ptid, minus_one_ptid)))
+ || ptid != minus_one_ptid))
async_file_mark ();
return event_ptid;
/* The target is connected but no live inferior is selected. Pass
this request down to a lower stratum (e.g., the executable
file). */
- if (object == TARGET_OBJECT_MEMORY && ptid_equal (inferior_ptid, null_ptid))
+ if (object == TARGET_OBJECT_MEMORY && inferior_ptid == null_ptid)
return TARGET_XFER_EOF;
if (object == TARGET_OBJECT_AUXV)
{
struct thread_db_info *info;
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
info = get_thread_db_info (inferior_ptid.pid ());
else
info = get_thread_db_info (ptid.pid ());
{
/* Suppress output while calling an inferior function. */
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
{
struct thread_info *tp = inferior_thread ();
{
struct thread_info *tp = NULL;
- if (ptid_equal (ptid, minus_one_ptid) || ptid.is_pid ())
+ if (ptid == minus_one_ptid || ptid.is_pid ())
tp = inferior_thread ();
else
tp = find_thread_ptid (ptid);
USER_SELECTED_THREAD | USER_SELECTED_FRAME);
/* Notify if the thread has effectively changed. */
- if (!ptid_equal (inferior_ptid, previous_ptid))
+ if (inferior_ptid != previous_ptid)
{
gdb::observers::user_selected_context_changed.notify
(USER_SELECTED_THREAD | USER_SELECTED_FRAME);
if (command->thread == -1)
{
- report_change = (!ptid_equal (previous_ptid, null_ptid)
- && !ptid_equal (inferior_ptid, previous_ptid)
- && !ptid_equal (inferior_ptid, null_ptid));
+ report_change = (previous_ptid != null_ptid
+ && inferior_ptid != previous_ptid
+ && inferior_ptid != null_ptid);
}
- else if (!ptid_equal (inferior_ptid, null_ptid))
+ else if (inferior_ptid != null_ptid)
{
struct thread_info *ti = inferior_thread ();
ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
{
ourstatus->kind = TARGET_WAITKIND_STOPPED;
ourstatus->value.sig = GDB_SIGNAL_0;
procfs_status status;
sigset_t *run_fault = (sigset_t *) (void *) &run.fault;
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
return;
- procfs_set_thread (ptid_equal (ptid, minus_one_ptid) ? inferior_ptid :
+ procfs_set_thread (ptid == minus_one_ptid ? inferior_ptid :
ptid);
run.flags = _DEBUG_RUN_FAULT | _DEBUG_RUN_TRACE;
void
nto_procfs_target::mourn_inferior ()
{
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
{
SignalKill (nto_node (), inferior_ptid.pid (), 0, SIGKILL, 0, 0);
close (ctl_fd);
char *data;
ptid_t ptid = regcache->ptid ();
- if (ptid_equal (ptid, null_ptid))
+ if (ptid == null_ptid)
return;
procfs_set_thread (ptid);
return 0;
/* Look up cached address of thread-local variable. */
- if (!ptid_equal (spe_context_cache_ptid, inferior_ptid))
+ if (spe_context_cache_ptid != inferior_ptid)
{
struct target_ops *target = current_top_target ();
/* The pointer is just a type alias. */
get_last_target_status (&wait_ptid, &wait_status);
- if (ptid_equal (wait_ptid, inferior_ptid)
+ if (wait_ptid == inferior_ptid
&& wait_status.kind == TARGET_WAITKIND_STOPPED
&& wait_status.value.sig == gdb_signal_from_host (signo)
&& proc_get_status (pi)
/* Got this far without error: If retval isn't in the
threads database, add it. */
if (retval.pid () > 0 &&
- !ptid_equal (retval, inferior_ptid) &&
+ retval != inferior_ptid &&
!in_thread_list (retval))
{
/* We have a new thread. We need to add it both to
void
procfs_target::kill ()
{
- if (!ptid_equal (inferior_ptid, null_ptid)) /* ? */
+ if (inferior_ptid != null_ptid) /* ? */
{
/* Find procinfo for main process. */
procinfo *pi = find_procinfo (inferior_ptid.pid (), 0);
{
procinfo *pi;
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
{
/* Find procinfo for main process. */
pi = find_procinfo (inferior_ptid.pid (), 0);
ptid_t active_task_ptid
= ravenscar_active_task (ravenscar_get_thread_base_cpu (ptid));
- return ptid_equal (ptid, active_task_ptid);
+ return ptid == active_task_ptid;
}
/* Return the CPU thread (as a ptid_t) on which the given ravenscar
/* Make sure we set base_ptid before calling ravenscar_active_task
as the latter relies on it. */
inferior_ptid = ravenscar_active_task (base_cpu);
- gdb_assert (!ptid_equal (inferior_ptid, null_ptid));
+ gdb_assert (inferior_ptid != null_ptid);
/* The running thread may not have been added to
system.tasking.debug's list yet; so ravenscar_update_thread_list
static int
ravenscar_runtime_initialized (void)
{
- return (!(ptid_equal (ravenscar_active_task (1), null_ptid)));
+ return (!(ravenscar_active_task (1) == null_ptid));
}
/* Return the ID of the thread that is currently running.
struct address_space *aspace)
{
for (const auto ®cache : regcache::current_regcache)
- if (ptid_equal (regcache->ptid (), ptid) && regcache->arch () == gdbarch)
+ if (regcache->ptid () == ptid && regcache->arch () == gdbarch)
return regcache;
regcache *new_regcache = new regcache (gdbarch, aspace);
struct regcache *
get_thread_regcache (ptid_t ptid)
{
- if (!current_thread_arch || !ptid_equal (current_thread_ptid, ptid))
+ if (!current_thread_arch || current_thread_ptid != ptid)
{
current_thread_ptid = ptid;
current_thread_arch = target_thread_architecture (ptid);
{
for (auto ®cache : regcache::current_regcache)
{
- if (ptid_equal (regcache->ptid (), old_ptid))
+ if (regcache->ptid () == old_ptid)
regcache->set_ptid (new_ptid);
}
}
(exec_file ? exec_file : "(NULL)"),
args);
- if (ptid_equal (inferior_ptid, sim_data->remote_sim_ptid))
+ if (inferior_ptid == sim_data->remote_sim_ptid)
kill ();
remove_breakpoints ();
init_wait_for_inferior ();
if (sim_data)
gdbsim_resume_inferior (find_inferior_ptid (ptid), &rd);
- else if (ptid_equal (ptid, minus_one_ptid))
+ else if (ptid == minus_one_ptid)
iterate_over_inferiors (gdbsim_resume_inferior, &rd);
else
error (_("The program is not being run."));
/* This target isn't able to (yet) resume more than one inferior at a time.
When ptid is minus_one_ptid, just use the current inferior. If we're
given an explicit pid, we'll try to find it and use that instead. */
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
sim_data = get_sim_inferior_data (current_inferior (),
SIM_INSTANCE_NEEDED);
else
if (sim_data == NULL)
return false;
- if (ptid_equal (ptid, sim_data->remote_sim_ptid))
+ if (ptid == sim_data->remote_sim_ptid)
/* The simulators' task is always alive. */
return true;
return;
}
- if (ptid_equal (magic_null_ptid, inferior_ptid))
+ if (magic_null_ptid == inferior_ptid)
{
/* inferior_ptid is not set yet. This can happen with the
vRun -> remote_wait,"TAAthread:" path if the stub
char *buf = rs->buf;
char *endbuf = rs->buf + get_remote_packet_size ();
- if (ptid_equal (state, ptid))
+ if (state == ptid)
return;
*buf++ = 'H';
*buf++ = gen ? 'g' : 'c';
- if (ptid_equal (ptid, magic_null_ptid))
+ if (ptid == magic_null_ptid)
xsnprintf (buf, endbuf - buf, "0");
- else if (ptid_equal (ptid, any_thread_ptid))
+ else if (ptid == any_thread_ptid)
xsnprintf (buf, endbuf - buf, "0");
- else if (ptid_equal (ptid, minus_one_ptid))
+ else if (ptid == minus_one_ptid)
xsnprintf (buf, endbuf - buf, "-1");
else
write_ptid (buf, endbuf, ptid);
static int
remote_thread_always_alive (ptid_t ptid)
{
- if (ptid_equal (ptid, magic_null_ptid))
+ if (ptid == magic_null_ptid)
/* The main thread is always alive. */
return 1;
what's in inferior_ptid, unless it's null at this point. If so,
then since there's no way to know the pid of the reported
threads, use the magic number. */
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
pid = magic_null_ptid.pid ();
else
pid = inferior_ptid.pid ();
internal_error (__FILE__, __LINE__,
_("remote_threads_extra_info"));
- if (ptid_equal (tp->ptid, magic_null_ptid)
+ if (tp->ptid == magic_null_ptid
|| (tp->ptid.pid () != 0 && tp->ptid.lwp () == 0))
/* This is the main thread which was added by GDB. The remote
server doesn't know about it. */
this point. */
if (wait_status != NULL)
ptid = stop_reply_extract_thread (wait_status);
- if (ptid_equal (ptid, null_ptid))
+ if (ptid == null_ptid)
ptid = remote_current_thread (inferior_ptid);
return ptid;
multi-threaded program, this will ideally be the thread
that last reported an event before GDB disconnected. */
inferior_ptid = get_current_thread (wait_status);
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
{
/* Odd... The target was able to list threads, but not
tell us which thread was current (no "thread"
{
struct thread_info *tp;
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
{
/* If we don't know about the target thread's tid, then
we're resuming magic_null_ptid (see caller). */
p += xsnprintf (p, endp - p, ":");
p = write_ptid (p, endp, nptid);
}
- else if (!ptid_equal (ptid, minus_one_ptid))
+ else if (ptid != minus_one_ptid)
{
p += xsnprintf (p, endp - p, ":");
p = write_ptid (p, endp, ptid);
ALL_NON_EXITED_THREADS (thread)
if (thread->ptid.matches (ptid)
- && !ptid_equal (inferior_ptid, thread->ptid)
+ && inferior_ptid != thread->ptid
&& thread->suspend.stop_signal != GDB_SIGNAL_0)
{
p = append_resumption (p, endp, thread->ptid,
/* The c/s/C/S resume packets use Hc, so set the continue
thread. */
- if (ptid_equal (ptid, minus_one_ptid))
+ if (ptid == minus_one_ptid)
set_continue_thread (any_thread_ptid);
else
set_continue_thread (ptid);
p += xsnprintf (p, endp - p, "vCont");
- if (ptid_equal (ptid, magic_null_ptid))
+ if (ptid == magic_null_ptid)
{
/* MAGIC_NULL_PTID means that we don't have any active threads,
so we don't have any TID numbers the inferior will
a TID. */
append_resumption (p, endp, minus_one_ptid, step, siggnal);
}
- else if (ptid_equal (ptid, minus_one_ptid) || ptid.is_pid ())
+ else if (ptid == minus_one_ptid || ptid.is_pid ())
{
/* Resume all threads (of all processes, or of a single
process), with preference for INFERIOR_PTID. This assumes
{
remote_thread_info *remote_thr;
- if (ptid_equal (minus_one_ptid, ptid) || ptid.is_pid ())
+ if (minus_one_ptid == ptid || ptid.is_pid ())
remote_thr = get_remote_thread_info (inferior_ptid);
else
remote_thr = get_remote_thread_info (ptid);
if (!rs->supports_vCont.t)
error (_("Remote server does not support stopping threads"));
- if (ptid_equal (ptid, minus_one_ptid)
+ if (ptid == minus_one_ptid
|| (!remote_multi_process_p (rs) && ptid.is_pid ()))
p += xsnprintf (p, endp - p, "vCont;t");
else
break;
}
- if (target_is_non_stop_p () && ptid_equal (event->ptid, null_ptid))
+ if (target_is_non_stop_p () && event->ptid == null_ptid)
error (_("No process or thread specified in stop reply: %s"), buf);
}
/* If no thread/process was reported by the stub, assume the current
inferior. */
- if (ptid_equal (ptid, null_ptid))
+ if (ptid == null_ptid)
ptid = inferior_ptid;
if (status->kind != TARGET_WAITKIND_EXITED
else if (status->kind != TARGET_WAITKIND_EXITED
&& status->kind != TARGET_WAITKIND_SIGNALLED)
{
- if (!ptid_equal (event_ptid, null_ptid))
+ if (event_ptid != null_ptid)
record_currthread (rs, event_ptid);
else
event_ptid = inferior_ptid;
static char buf[64];
struct remote_state *rs = get_remote_state ();
- if (ptid_equal (ptid, null_ptid))
+ if (ptid == null_ptid)
return normal_pid_to_str (ptid);
else if (ptid.is_pid ())
{
}
else
{
- if (ptid_equal (magic_null_ptid, ptid))
+ if (magic_null_ptid == ptid)
xsnprintf (buf, sizeof buf, "Thread <main>");
else if (remote_multi_process_p (rs))
if (ptid.lwp () == 0)
/* Do not try this during initial connection, when we do not know
whether there is a running but stopped thread. */
- if (!target_has_execution || ptid_equal (inferior_ptid, null_ptid))
+ if (!target_has_execution || inferior_ptid == null_ptid)
return beneath ()->read_description ();
if (!VEC_empty (remote_g_packet_guess_s, data->guesses))
/* See if we have a new thread. */
if (rtnval.tid_p ()
- && !ptid_equal (rtnval, save_ptid)
+ && rtnval != save_ptid
&& (!in_thread_list (rtnval)
|| is_exited (rtnval)))
add_thread (rtnval);
/* We can reach here due to changing solib-search-path or the
sysroot, before having any inferior. */
- if (target_has_execution && !ptid_equal (inferior_ptid, null_ptid))
+ if (target_has_execution && inferior_ptid != null_ptid)
{
struct inferior *inf = current_inferior ();
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;
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;
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.
int pid_width;
int line_width;
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
pid_name = "No process";
else
pid_name = target_pid_to_str (inferior_ptid);
DWORD continue_status = DBG_CONTINUE;
/* A specific PTID means `step only this thread id'. */
- int resume_all = ptid_equal (ptid, minus_one_ptid);
+ int resume_all = ptid == minus_one_ptid;
/* If we're continuing all threads, it's the current inferior that
should be handled specially. */
static struct value *
tlb_make_value (struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
{
- if (target_has_stack && !ptid_equal (inferior_ptid, null_ptid))
+ if (target_has_stack && inferior_ptid != null_ptid)
{
struct type *type = windows_get_tlb_type (gdbarch);
return allocate_computed_value (type, &tlb_value_funcs, NULL);
static void
display_tib (const char * args, int from_tty)
{
- if (!ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid != null_ptid)
display_one_tib (inferior_ptid);
}