Remove ptid_tid_p
authorTom Tromey <tom@tromey.com>
Mon, 11 Jun 2018 18:22:04 +0000 (12:22 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 3 Jul 2018 17:36:45 +0000 (11:36 -0600)
This removes ptid_tid_p in favor of the ptid_t::tid_p method.

gdb/ChangeLog
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.

gdb/ChangeLog
gdb/common/ptid.c
gdb/common/ptid.h
gdb/sol-thread.c

index ca4a11aec0c01013615ec184b0b891c03a108401..2072328414ccc42ce5d4efd2db6a5297cd8afd4f 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2018-07-03  Tom Tromey  <tom@tromey.com>
 
        * common/ptid.c (ptid_lwp_p): Remove.
index 9bf6e2d9a9277a2d95156a5010ca9def7a215cd0..e0f62b10f1a6ca0cf41582cef30717839b9bafed 100644 (file)
@@ -35,14 +35,6 @@ ptid_equal (const ptid_t &ptid1, const ptid_t &ptid2)
 
 /* See ptid.h.  */
 
-int
-ptid_tid_p (const ptid_t &ptid)
-{
-  return ptid.tid_p ();
-}
-
-/* See ptid.h.  */
-
 int
 ptid_match (const ptid_t &ptid, const ptid_t &filter)
 {
index 8830dce2dc6cd75870d5aeece99af26c89ab6e36..86878de905dbd6156809ba462375d2830926c2a3 100644 (file)
@@ -160,10 +160,6 @@ extern ptid_t minus_one_ptid;
 
 extern int ptid_equal (const ptid_t &ptid1, const ptid_t &ptid2);
 
-/* See ptid_t::tid_p.  */
-
-extern int ptid_tid_p (const ptid_t &ptid);
-
 /* See ptid_t::matches.  */
 
 extern int ptid_match (const ptid_t &ptid, const ptid_t &filter);
index bb73c4a031507c6b674ae22045ec69b6d72e8d77..4bb9b34ae547413bd80f6e42b7bcf8f4c060c893 100644 (file)
@@ -340,7 +340,7 @@ lwp_to_thread (ptid_t lwp)
   td_thrhandle_t th;
   td_err_e val;
 
-  if (ptid_tid_p (lwp))
+  if (lwp.tid_p ())
     return lwp;                        /* It's already a thread ID.  */
 
   /* It's an LWP.  Convert it to a thread ID.  */
@@ -460,7 +460,7 @@ sol_thread_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
        rtnval = save_ptid;
 
       /* See if we have a new thread.  */
-      if (ptid_tid_p (rtnval)
+      if (rtnval.tid_p ()
          && !ptid_equal (rtnval, save_ptid)
          && (!in_thread_list (rtnval)
              || is_exited (rtnval)))
@@ -486,7 +486,7 @@ sol_thread_target::fetch_registers (struct regcache *regcache, int regnum)
   gdb_fpregset_t *fpregset_p = &fpregset;
   ptid_t ptid = regcache->ptid ();
 
-  if (!ptid_tid_p (ptid))
+  if (!ptid.tid_p ())
     {
       /* It's an LWP; pass the request on to the layer beneath.  */
       beneath ()->fetch_registers (regcache, regnum);
@@ -538,7 +538,7 @@ sol_thread_target::store_registers (struct regcache *regcache, int regnum)
   prfpregset_t fpregset;
   ptid_t ptid = regcache->ptid ();
 
-  if (!ptid_tid_p (ptid))
+  if (!ptid.tid_p ())
     {
       /* It's an LWP; pass the request on to the layer beneath.  */
       beneath ()->store_registers (regcache, regnum);
@@ -591,7 +591,7 @@ sol_thread_target::xfer_partial (enum target_object object,
 {
   scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid);
 
-  if (ptid_tid_p (inferior_ptid) || !target_thread_alive (inferior_ptid))
+  if (inferior_ptid.tid_p () || !target_thread_alive (inferior_ptid))
     {
       /* It's either a thread or an LWP that isn't alive.  Any live
          LWP will do so use the first available.
@@ -697,7 +697,7 @@ sol_thread_target::mourn_inferior ()
 bool
 sol_thread_target::thread_alive (ptid_t ptid)
 {
-  if (ptid_tid_p (ptid))
+  if (ptid.tid_p ())
     {
       /* It's a (user-level) thread.  */
       td_err_e val;
@@ -785,7 +785,7 @@ rw_common (int dowrite, const struct ps_prochandle *ph, psaddr_t addr,
 
   scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid);
 
-  if (ptid_tid_p (inferior_ptid) || !target_thread_alive (inferior_ptid))
+  if (inferior_ptid.tid_p () || !target_thread_alive (inferior_ptid))
     {
       /* It's either a thread or an LWP that isn't alive.  Any live
          LWP will do so use the first available.
@@ -1003,7 +1003,7 @@ sol_thread_target::pid_to_str (ptid_t ptid)
 {
   static char buf[100];
 
-  if (ptid_tid_p (ptid))
+  if (ptid.tid_p ())
     {
       ptid_t lwp;
 
This page took 0.031443 seconds and 4 git commands to generate.