This removes ptid_is_pid in favor of the ptid_t::is_pid method.
gdb/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* common/ptid.c (ptid_is_pid): Remove.
* common/ptid.h (ptid_is_pid): Don't declare.
* infrun.c: Update.
* linux-nat.c: Update.
* mi/mi-interp.c: Update.
* remote.c: Update.
* thread.c: Update.
gdb/gdbserver/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* linux-low.c: Update.
2018-07-03 Tom Tromey <tom@tromey.com>
+ * common/ptid.c (ptid_is_pid): Remove.
+ * common/ptid.h (ptid_is_pid): Don't declare.
+ * infrun.c: Update.
+ * linux-nat.c: Update.
+ * mi/mi-interp.c: Update.
+ * remote.c: Update.
+ * thread.c: Update.
+
+2018-07-03 Tom Tromey <tom@tromey.com>
+
* common/ptid.c (ptid_get_tid): Remove.
* common/ptid.h (ptid_get_tid): Don't declare.
* ada-tasks.c: Update.
/* See ptid.h. */
int
-ptid_is_pid (const ptid_t &ptid)
-{
- return ptid.is_pid ();
-}
-
-/* See ptid.h. */
-
-int
ptid_lwp_p (const ptid_t &ptid)
{
return ptid.lwp_p ();
extern int ptid_equal (const ptid_t &ptid1, const ptid_t &ptid2);
-/* See ptid_t::is_pid. */
-
-extern int ptid_is_pid (const ptid_t &ptid);
-
/* See ptid_t::lwp_p. */
extern int ptid_lwp_p (const ptid_t &ptid);
2018-07-03 Tom Tromey <tom@tromey.com>
+ * linux-low.c: Update.
+
+2018-07-03 Tom Tromey <tom@tromey.com>
+
* target.c: Update.
2018-07-03 Tom Tromey <tom@tromey.com>
/* Check for a lwp with a pending status. */
- if (ptid_equal (filter_ptid, minus_one_ptid) || ptid_is_pid (filter_ptid))
+ if (ptid_equal (filter_ptid, minus_one_ptid) || filter_ptid.is_pid ())
{
event_thread = find_thread_in_random ([&] (thread_info *thread)
{
/* Handle both 'pPID' and 'pPID.-1' as meaning 'all threads
of PID'. */
|| (ptid.pid () == pid_of (thread)
- && (ptid_is_pid (ptid)
+ && (ptid.is_pid ()
|| ptid.lwp () == -1)))
{
if (resume[ndx].kind == resume_stop
/* First check if there is a resumed thread with a wait status
pending. */
- if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid))
+ if (ptid_equal (ptid, minus_one_ptid) || ptid.is_pid ())
{
tp = random_pending_event_thread (ptid);
}
/* A specific PTID means `step only this process id'. */
resume_many = (ptid_equal (minus_one_ptid, ptid)
- || ptid_is_pid (ptid));
+ || ptid.is_pid ());
/* Mark the lwps we're resuming as resumed. */
iterate_over_lwps (ptid, resume_set_callback, NULL);
/* The first time we get here after starting a new inferior, we may
not have added it to the LWP list yet - this is the earliest
moment at which we know its PID. */
- if (ptid_is_pid (inferior_ptid))
+ if (inferior_ptid.is_pid ())
{
/* Upgrade the main thread's ptid. */
thread_change_ptid (inferior_ptid,
/* 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 (ptid))
+ if (ptid_equal (ptid, minus_one_ptid) || ptid.is_pid ())
select_event_lwp (ptid, &lp, &status);
gdb_assert (lp != NULL);
if (ptid.pid () == -1)
fprintf_unfiltered (mi->raw_stdout, "*running,thread-id=\"all\"\n");
- else if (ptid_is_pid (ptid))
+ else if (ptid.is_pid ())
{
int count = 0;
inferior *inf;
{
struct thread_info *tp = NULL;
- if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid))
+ if (ptid_equal (ptid, minus_one_ptid) || ptid.is_pid ())
tp = inferior_thread ();
else
tp = find_thread_ptid (ptid);
struct inferior *inf = NULL;
int pid = currthread.pid ();
- if (ptid_is_pid (inferior_ptid)
+ if (inferior_ptid.is_pid ()
&& pid == inferior_ptid.pid ())
{
/* inferior_ptid has no thread member yet. This can happen
threads with a wildcard (though the protocol allows it,
so stubs shouldn't make an active effort to forbid
it). */
- && !(remote_multi_process_p (rs) && ptid_is_pid (ptid)))
+ && !(remote_multi_process_p (rs) && ptid.is_pid ()))
{
struct thread_info *tp;
else
p += xsnprintf (p, endp - p, ";c");
- if (remote_multi_process_p (rs) && ptid_is_pid (ptid))
+ if (remote_multi_process_p (rs) && ptid.is_pid ())
{
ptid_t nptid;
a TID. */
append_resumption (p, endp, minus_one_ptid, step, siggnal);
}
- else if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid))
+ else if (ptid_equal (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 (ptid))
+ if (ptid_equal (minus_one_ptid, ptid) || ptid.is_pid ())
remote_thr = get_remote_thread_info (inferior_ptid);
else
remote_thr = get_remote_thread_info (ptid);
error (_("Remote server does not support stopping threads"));
if (ptid_equal (ptid, minus_one_ptid)
- || (!remote_multi_process_p (rs) && ptid_is_pid (ptid)))
+ || (!remote_multi_process_p (rs) && ptid.is_pid ()))
p += xsnprintf (p, endp - p, "vCont;t");
else
{
p += xsnprintf (p, endp - p, "vCont;t:");
- if (ptid_is_pid (ptid))
+ if (ptid.is_pid ())
/* All (-1) threads of process. */
nptid = ptid_t (ptid.pid (), -1, 0);
else
if (ptid_equal (ptid, null_ptid))
return normal_pid_to_str (ptid);
- else if (ptid_is_pid (ptid))
+ else if (ptid.is_pid ())
{
/* Printing an inferior target id. */
struct thread_info *tp;
int all = ptid == minus_one_ptid;
- if (all || ptid_is_pid (ptid))
+ if (all || ptid.is_pid ())
{
for (tp = thread_list; tp; tp = tp->next)
if (all || tp->ptid.pid () == ptid.pid ())
/* We try not to notify the observer if no thread has actually changed
the running state -- merely to reduce the number of messages to
frontend. Frontend is supposed to handle multiple *running just fine. */
- if (all || ptid_is_pid (ptid))
+ if (all || ptid.is_pid ())
{
for (tp = thread_list; tp; tp = tp->next)
if (all || tp->ptid.pid () == ptid.pid ())
struct thread_info *tp;
int all = ptid == minus_one_ptid;
- if (all || ptid_is_pid (ptid))
+ if (all || ptid.is_pid ())
{
for (tp = thread_list; tp; tp = tp->next)
if (all || tp->ptid.pid () == ptid.pid ())
struct thread_info *tp;
int all = ptid == minus_one_ptid;
- if (all || ptid_is_pid (ptid))
+ if (all || ptid.is_pid ())
{
for (tp = thread_list; tp; tp = tp->next)
if (all || tp->ptid.pid () == ptid.pid ())
all = ptid == minus_one_ptid;
- if (all || ptid_is_pid (ptid))
+ if (all || ptid.is_pid ())
{
for (tp = thread_list; tp; tp = tp->next)
{