This removes ptid_lwp_p in favor of the ptid_t::lwp_p method.
gdb/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* common/ptid.c (ptid_lwp_p): Remove.
* common/ptid.h (ptid_lwp_p): Don't declare.
* fbsd-nat.c: Update.
* linux-nat.c: Update.
* nat/linux-procfs.c: Update.
* nat/x86-linux-dregs.c: Update.
* sol-thread.c: Update.
+2018-07-03 Tom Tromey <tom@tromey.com>
+
+ * common/ptid.c (ptid_lwp_p): Remove.
+ * common/ptid.h (ptid_lwp_p): Don't declare.
+ * fbsd-nat.c: Update.
+ * linux-nat.c: Update.
+ * nat/linux-procfs.c: Update.
+ * nat/x86-linux-dregs.c: Update.
+ * sol-thread.c: Update.
+
2018-07-03 Tom Tromey <tom@tromey.com>
* common/ptid.c (ptid_is_pid): Remove.
/* See ptid.h. */
-int
-ptid_lwp_p (const ptid_t &ptid)
-{
- return ptid.lwp_p ();
-}
-
-/* See ptid.h. */
-
int
ptid_tid_p (const ptid_t &ptid)
{
extern int ptid_equal (const ptid_t &ptid1, const ptid_t &ptid2);
-/* See ptid_t::lwp_p. */
-
-extern int ptid_lwp_p (const ptid_t &ptid);
-
/* See ptid_t::tid_p. */
extern int ptid_tid_p (const ptid_t &ptid);
bool
fbsd_nat_target::thread_alive (ptid_t ptid)
{
- if (ptid_lwp_p (ptid))
+ if (ptid.lwp_p ())
{
struct ptrace_lwpinfo pl;
"FLWP: fbsd_resume for ptid (%d, %ld, %ld)\n",
ptid.pid (), ptid.lwp (),
ptid.tid ());
- if (ptid_lwp_p (ptid))
+ if (ptid.lwp_p ())
{
/* If ptid is a specific LWP, suspend all other LWPs in the process. */
struct thread_info *tp;
{
struct lwp_info *lp;
- gdb_assert (ptid_lwp_p (ptid));
+ gdb_assert (ptid.lwp_p ());
lp = XNEW (struct lwp_info);
int lwp;
struct lwp_info dummy;
- if (ptid_lwp_p (ptid))
+ if (ptid.lwp_p ())
lwp = ptid.lwp ();
else
lwp = ptid.pid ();
{
static char buf[64];
- if (ptid_lwp_p (ptid)
+ if (ptid.lwp_p ()
&& (ptid.pid () != ptid.lwp ()
|| num_lwps (ptid.pid ()) > 1))
{
ptid_t
current_lwp_ptid (void)
{
- gdb_assert (ptid_lwp_p (inferior_ptid));
+ gdb_assert (inferior_ptid.lwp_p ());
return inferior_ptid;
}
char comm_path[100];
const char *comm_val;
pid_t pid = ptid.pid ();
- pid_t tid = ptid_lwp_p (ptid) ? ptid.lwp () : ptid.pid ();
+ pid_t tid = ptid.lwp_p () ? ptid.lwp () : ptid.pid ();
xsnprintf (comm_path, sizeof (comm_path),
"/proc/%ld/task/%ld/comm", (long) pid, (long) tid);
int tid;
unsigned long value;
- gdb_assert (ptid_lwp_p (ptid));
+ gdb_assert (ptid.lwp_p ());
tid = ptid.lwp ();
errno = 0;
{
int tid;
- gdb_assert (ptid_lwp_p (ptid));
+ gdb_assert (ptid.lwp_p ());
tid = ptid.lwp ();
errno = 0;
td_thrhandle_t th;
td_err_e val;
- if (ptid_lwp_p (thread_id))
+ if (thread_id.lwp_p ())
return thread_id; /* It's already an LWP ID. */
/* It's a thread. Convert to LWP. */