This removes ptid_match in favor of the ptid_t::matches method.
gdb/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* common/ptid.c (ptid_match): Remove.
* common/ptid.h (ptid_match): Don't declare.
* fbsd-nat.c: Update.
* infcmd.c: Update.
* infrun.c: Update.
* linux-nat.c: Update.
* record-btrace.c: Update.
* regcache.c: Update.
* remote.c: Update.
gdb/gdbserver/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* server.c: Update.
2018-07-03 Tom Tromey <tom@tromey.com>
+ * common/ptid.c (ptid_match): Remove.
+ * common/ptid.h (ptid_match): Don't declare.
+ * fbsd-nat.c: Update.
+ * infcmd.c: Update.
+ * infrun.c: Update.
+ * linux-nat.c: Update.
+ * record-btrace.c: Update.
+ * regcache.c: Update.
+ * remote.c: Update.
+
+2018-07-03 Tom Tromey <tom@tromey.com>
+
* common/ptid.c (ptid_tid_p): Remove.
* common/ptid.h (ptid_tid_p): Don't declare.
* sol-thread.c: Update.
{
return ptid1 == ptid2;
}
-
-/* See ptid.h. */
-
-int
-ptid_match (const ptid_t &ptid, const ptid_t &filter)
-{
- return ptid.matches (filter);
-}
extern int ptid_equal (const ptid_t &ptid1, const ptid_t &ptid2);
-/* See ptid_t::matches. */
-
-extern int ptid_match (const ptid_t &ptid, const ptid_t &filter);
-
#endif
ALL_NON_EXITED_THREADS (tp)
{
- if (!ptid_match (tp->ptid, ptid))
+ if (!tp->ptid.matches (ptid))
continue;
if (ptrace (PT_RESUME, tp->ptid.lwp (), NULL, 0) == -1)
2018-07-03 Tom Tromey <tom@tromey.com>
+ * server.c: Update.
+
+2018-07-03 Tom Tromey <tom@tromey.com>
+
* linux-low.c: Update.
2018-07-03 Tom Tromey <tom@tromey.com>
ptid_t filter_ptid = *(ptid_t *) data;
struct vstop_notif *vstop_event = (struct vstop_notif *) event;
- if (ptid_match (vstop_event->ptid, filter_ptid))
+ if (vstop_event->ptid.matches (filter_ptid))
{
if (q->free_func != NULL)
q->free_func (event);
ptid_t filter_ptid = *(ptid_t *) data;
struct vstop_notif *vstop_event = (struct vstop_notif *) event;
- if (ptid_match (vstop_event->ptid, filter_ptid))
+ if (vstop_event->ptid.matches (filter_ptid))
return 0;
/* Don't resume fork children that GDB does not know about yet. */
if ((vstop_event->status.kind == TARGET_WAITKIND_FORKED
|| vstop_event->status.kind == TARGET_WAITKIND_VFORKED)
- && ptid_match (vstop_event->status.value.related_pid, filter_ptid))
+ && vstop_event->status.value.related_pid.matches (filter_ptid))
return 0;
return 1;
{
if (ptid_equal (tp->ptid, inferior_ptid))
continue;
- if (!ptid_match (tp->ptid, resume_ptid))
+ if (!tp->ptid.matches (resume_ptid))
continue;
if (tp->suspend.stop_signal != GDB_SIGNAL_0
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);
}
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;
/* 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)
{
lpnext = lp->next;
- if (ptid_match (lp->ptid, filter))
+ if (lp->ptid.matches (filter))
{
if ((*callback) (lp, data) != 0)
return lp;
/* Don't bother if there's a breakpoint at PC that we'd hit
immediately, and we're not waiting for this LWP. */
- if (!ptid_match (lp->ptid, *wait_ptid_p))
+ if (!lp->ptid.matches (*wait_ptid_p))
{
if (breakpoint_inserted_here_p (regcache->aspace (), pc))
leave_stopped = 1;
struct thread_info *tp;
ALL_NON_EXITED_THREADS (tp)
- if (ptid_match (tp->ptid, ptid) && btrace_is_replaying (tp))
+ if (tp->ptid.matches (ptid) && btrace_is_replaying (tp))
return true;
return false;
For all-stop targets, we only step INFERIOR_PTID and continue others. */
if (!target_is_non_stop_p ())
{
- gdb_assert (ptid_match (inferior_ptid, ptid));
+ gdb_assert (inferior_ptid.matches (ptid));
ALL_NON_EXITED_THREADS (tp)
- if (ptid_match (tp->ptid, ptid))
+ if (tp->ptid.matches (ptid))
{
- if (ptid_match (tp->ptid, inferior_ptid))
+ if (tp->ptid.matches (inferior_ptid))
record_btrace_resume_thread (tp, flag);
else
record_btrace_resume_thread (tp, cflag);
else
{
ALL_NON_EXITED_THREADS (tp)
- if (ptid_match (tp->ptid, ptid))
+ if (tp->ptid.matches (ptid))
record_btrace_resume_thread (tp, flag);
}
ALL_NON_EXITED_THREADS (tp)
{
- if (ptid_match (tp->ptid, ptid)
+ if (tp->ptid.matches (ptid)
&& ((tp->btrace.flags & (BTHR_MOVE | BTHR_STOP)) != 0))
moving.push_back (tp);
}
struct thread_info *tp;
ALL_NON_EXITED_THREADS (tp)
- if (ptid_match (tp->ptid, ptid))
+ if (tp->ptid.matches (ptid))
{
tp->btrace.flags &= ~BTHR_MOVE;
tp->btrace.flags |= BTHR_STOP;
it != regcache::current_regcache.end ();
)
{
- if (ptid_match ((*it)->ptid (), ptid))
+ if ((*it)->ptid ().matches (ptid))
{
delete *it;
it = regcache::current_regcache.erase_after (oit);
oit = it++;
}
- if (ptid_match (current_thread_ptid, ptid))
+ if (current_thread_ptid.matches (ptid))
{
current_thread_ptid = null_ptid;
current_thread_arch = NULL;
}
- if (ptid_match (inferior_ptid, ptid))
+ if (inferior_ptid.matches (ptid))
{
/* We just deleted the regcache of the current thread. Need to
forget about any frames we have cached, too. */
struct thread_info *thread;
ALL_NON_EXITED_THREADS (thread)
- if (ptid_match (thread->ptid, ptid)
+ if (thread->ptid.matches (ptid)
&& !ptid_equal (inferior_ptid, thread->ptid)
&& thread->suspend.stop_signal != GDB_SIGNAL_0)
{