Remove ptid_build
authorTom Tromey <tom@tromey.com>
Mon, 11 Jun 2018 17:18:51 +0000 (11:18 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 3 Jul 2018 17:36:41 +0000 (11:36 -0600)
This removes ptid_build in favor of simply calling the ptid_t
constructor directly.

gdb/ChangeLog
2018-07-03  Tom Tromey  <tom@tromey.com>

* common/ptid.h (ptid_build): Don't declare.
* common/ptid.c (ptid_build): Remove.
* aix-thread.c: Update.
* bsd-kvm.c: Update.
* bsd-uthread.c: Update.
* common/agent.c: Update.
* common/ptid.c: Update.
* common/ptid.h: Update.
* corelow.c: Update.
* darwin-nat.c: Update.
* fbsd-nat.c: Update.
* gnu-nat.c: Update.
* linux-fork.c: Update.
* linux-nat.c: Update.
* linux-thread-db.c: Update.
* nat/linux-osdata.c: Update.
* nat/linux-procfs.c: Update.
* nto-procfs.c: Update.
* obsd-nat.c: Update.
* proc-service.c: Update.
* procfs.c: Update.
* ravenscar-thread.c: Update.
* remote-sim.c: Update.
* remote.c: Update.
* sol-thread.c: Update.
* target.c: Update.
* windows-nat.c: Update.

gdb/gdbserver/ChangeLog
2018-07-03  Tom Tromey  <tom@tromey.com>

* linux-low.c: Update.
* lynx-low.c: Update.
* nto-low.c: Update.
* remote-utils.c: Update.
* spu-low.c: Update.
* thread-db.c: Update.
* win32-low.c: Update.

33 files changed:
gdb/ChangeLog
gdb/aix-thread.c
gdb/bsd-kvm.c
gdb/bsd-uthread.c
gdb/common/agent.c
gdb/common/ptid.c
gdb/common/ptid.h
gdb/corelow.c
gdb/darwin-nat.c
gdb/fbsd-nat.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c
gdb/gdbserver/lynx-low.c
gdb/gdbserver/nto-low.c
gdb/gdbserver/remote-utils.c
gdb/gdbserver/spu-low.c
gdb/gdbserver/thread-db.c
gdb/gdbserver/win32-low.c
gdb/gnu-nat.c
gdb/linux-fork.c
gdb/linux-nat.c
gdb/linux-thread-db.c
gdb/nat/linux-osdata.c
gdb/nat/linux-procfs.c
gdb/nto-procfs.c
gdb/obsd-nat.c
gdb/procfs.c
gdb/ravenscar-thread.c
gdb/remote-sim.c
gdb/remote.c
gdb/sol-thread.c
gdb/target.c
gdb/windows-nat.c

index 0841703435f6a05ebbe906503c01d2af163aea7b..55e0bf934b9986633b0439700ffd3af408ebaea4 100644 (file)
@@ -1,3 +1,33 @@
+2018-07-03  Tom Tromey  <tom@tromey.com>
+
+       * common/ptid.h (ptid_build): Don't declare.
+       * common/ptid.c (ptid_build): Remove.
+       * aix-thread.c: Update.
+       * bsd-kvm.c: Update.
+       * bsd-uthread.c: Update.
+       * common/agent.c: Update.
+       * common/ptid.c: Update.
+       * common/ptid.h: Update.
+       * corelow.c: Update.
+       * darwin-nat.c: Update.
+       * fbsd-nat.c: Update.
+       * gnu-nat.c: Update.
+       * linux-fork.c: Update.
+       * linux-nat.c: Update.
+       * linux-thread-db.c: Update.
+       * nat/linux-osdata.c: Update.
+       * nat/linux-procfs.c: Update.
+       * nto-procfs.c: Update.
+       * obsd-nat.c: Update.
+       * proc-service.c: Update.
+       * procfs.c: Update.
+       * ravenscar-thread.c: Update.
+       * remote-sim.c: Update.
+       * remote.c: Update.
+       * sol-thread.c: Update.
+       * target.c: Update.
+       * windows-nat.c: Update.
+
 2018-07-03  Tom Tromey  <tom@tromey.com>
 
        * infrun.c (follow_exec): Use exit_inferior_silent.
index 345242aa5716afd06836cb3efb9dce7ec69c5e58..589e5853c4b699c8e8c7210bd9046352a66c6ee5 100644 (file)
@@ -818,7 +818,7 @@ sync_threadlists (void)
          ptid_t pptid, gptid;
          int cmp_result;
 
-         pptid = ptid_build (infpid, 0, pbuf[pi].pthid);
+         pptid = ptid_t (infpid, 0, pbuf[pi].pthid);
          gptid = gbuf[gi]->ptid;
          pdtid = pbuf[pi].pdtid;
          tid = pbuf[pi].tid;
@@ -1832,7 +1832,7 @@ aix_thread_target::extra_thread_info (struct thread_info *thread)
 ptid_t
 aix_thread_target::get_ada_task_ptid (long lwp, long thread)
 {
-  return ptid_build (ptid_get_pid (inferior_ptid), 0, thread);
+  return ptid_t (ptid_get_pid (inferior_ptid), 0, thread);
 }
 
 
index 434c1928b79c87eb97fca9f3091e31410c04de76..078cd30c054199679f84ab22bcc54a5d57c0d7d6 100644 (file)
@@ -413,5 +413,5 @@ Generic command for manipulating the kernel memory interface."),
      ptid (1, 1, 2) -> kvm inferior 1, process 2
      ptid (1, 1, n) -> kvm inferior 1, process n  */
 
-  bsd_kvm_ptid = ptid_build (1, 1, 0);
+  bsd_kvm_ptid = ptid_t (1, 1, 0);
 }
index 6ae673ffbfddebc2f41ba8ff356c36fe241b2af6..c2e6ea9536de1ebb322d34ef9154392b7567c87f 100644 (file)
@@ -407,7 +407,7 @@ bsd_uthread_target::wait (ptid_t ptid, struct target_waitstatus *status,
        {
          ULONGEST magic = extract_unsigned_integer (buf, 4, byte_order);
          if (magic == BSD_UTHREAD_PTHREAD_MAGIC)
-           ptid = ptid_build (ptid_get_pid (ptid), 0, addr);
+           ptid = ptid_t (ptid_get_pid (ptid), 0, addr);
        }
     }
 
@@ -466,7 +466,7 @@ bsd_uthread_target::update_thread_list ()
   addr = bsd_uthread_read_memory_address (bsd_uthread_thread_list_addr);
   while (addr != 0)
     {
-      ptid_t ptid = ptid_build (pid, 0, addr);
+      ptid_t ptid = ptid_t (pid, 0, addr);
 
       thread_info *thread = find_thread_ptid (ptid);
       if (thread == nullptr || thread->state == THREAD_EXITED)
index da91f2d60ac1450d5cd0369155c3e55f3495c2ed..65d5f1938b88d9458f099c892f9c9bfce0c5c01e 100644 (file)
@@ -190,7 +190,7 @@ agent_run_command (int pid, const char *cmd, int len)
 {
   int fd;
   int tid = agent_get_helper_thread_id ();
-  ptid_t ptid = ptid_build (pid, tid, 0);
+  ptid_t ptid = ptid_t (pid, tid, 0);
 
   int ret = target_write_memory (ipa_sym_addrs.addr_cmd_buf,
                                 (gdb_byte *) cmd, len);
index c3d2794141d6e9a53bf8604857ae3822ac92a0fc..49d27b4d55ddec3b5e80b08bacb81ef9dec1c0b8 100644 (file)
@@ -27,14 +27,6 @@ ptid_t minus_one_ptid = ptid_t::make_minus_one ();
 
 /* See ptid.h.  */
 
-ptid_t
-ptid_build (int pid, long lwp, long tid)
-{
-  return ptid_t (pid, lwp, tid);
-}
-
-/* See ptid.h.  */
-
 ptid_t
 pid_to_ptid (int pid)
 {
index 4b454520588a4d812a01546dc0a368931c1385e3..030e97d45bc62e6a49858a559ee3b20bb8c97584 100644 (file)
@@ -158,10 +158,6 @@ extern ptid_t minus_one_ptid;
 
 /* See ptid_t::ptid_t.  */
 
-extern ptid_t ptid_build (int pid, long lwp, long tid);
-
-/* See ptid_t::ptid_t.  */
-
 extern ptid_t pid_to_ptid (int pid);
 
 /* See ptid_t::pid.  */
index ed20b531beed7432dbd3782fd61d32d5412241d2..f9185e104e8856399a88a5b85bed15973326b0b6 100644 (file)
@@ -310,7 +310,7 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
       inf->fake_pid_p = fake_pid_p;
     }
 
-  ptid = ptid_build (pid, lwpid, 0);
+  ptid = ptid_t (pid, lwpid, 0);
 
   add_thread (ptid);
 
index 6fb108846d0b921fb09ff585832843c9faf66946..c306d37364115159963c750442f8b0e572e854c6 100644 (file)
@@ -342,7 +342,7 @@ darwin_check_new_threads (struct inferior *inf)
          pti->msg_state = DARWIN_RUNNING;
 
          /* Add the new thread.  */
-         add_thread_with_info (ptid_build (inf->pid, 0, new_id), pti);
+         add_thread_with_info (ptid_t (inf->pid, 0, new_id), pti);
          new_thread_vec.push_back (pti);
          new_ix++;
          continue;
@@ -351,7 +351,7 @@ darwin_check_new_threads (struct inferior *inf)
        {
          /* A thread was removed.  */
          struct thread_info *thr
-           = find_thread_ptid (ptid_build (inf->pid, 0, old_id));
+           = find_thread_ptid (ptid_t (inf->pid, 0, old_id));
          delete_thread (thr);
          kret = mach_port_deallocate (gdb_task, old_id);
          MACH_CHECK_ERROR (kret);
@@ -1074,7 +1074,7 @@ darwin_decode_message (mach_msg_header_t *hdr,
          break;
        }
 
-      return ptid_build (inf->pid, 0, thread->gdb_port);
+      return ptid_t (inf->pid, 0, thread->gdb_port);
     }
   else if (hdr->msgh_id == 0x48)
     {
@@ -1134,7 +1134,7 @@ darwin_decode_message (mach_msg_header_t *hdr,
              /* Looks necessary on Leopard and harmless...  */
              wait4 (inf->pid, &wstatus, 0, NULL);
 
-             inferior_ptid = ptid_build (inf->pid, 0, 0);
+             inferior_ptid = ptid_t (inf->pid, 0, 0);
              return inferior_ptid;
            }
          else
@@ -1142,7 +1142,7 @@ darwin_decode_message (mach_msg_header_t *hdr,
              inferior_debug (4, _("darwin_wait: pid=%d\n"), inf->pid);
              status->kind = TARGET_WAITKIND_EXITED;
              status->value.integer = 0; /* Don't know.  */
-             return ptid_build (inf->pid, 0, 0);
+             return ptid_t (inf->pid, 0, 0);
            }
        }
     }
@@ -1213,7 +1213,7 @@ darwin_wait (ptid_t ptid, struct target_waitstatus *status)
       status->value.sig = GDB_SIGNAL_TRAP;
       thread = priv->threads[0];
       thread->msg_state = DARWIN_STOPPED;
-      return ptid_build (inf->pid, 0, thread->gdb_port);
+      return ptid_t (inf->pid, 0, thread->gdb_port);
     }
 
   do
@@ -1285,7 +1285,7 @@ darwin_wait (ptid_t ptid, struct target_waitstatus *status)
          && thread->event.ex_type == EXC_BREAKPOINT)
        {
          if (thread->single_step
-             || cancel_breakpoint (ptid_build (inf->pid, 0, thread->gdb_port)))
+             || cancel_breakpoint (ptid_t (inf->pid, 0, thread->gdb_port)))
            {
              gdb_assert (thread->msg_state == DARWIN_MESSAGE);
              darwin_send_reply (inf, thread);
@@ -2272,7 +2272,7 @@ darwin_nat_target::get_ada_task_ptid (long lwp, long thread)
   for (darwin_thread_t *t : priv->threads)
     {
       if (t->inf_port == lwp)
-       return ptid_build (ptid_get_pid (inferior_ptid), 0, t->gdb_port);
+       return ptid_t (ptid_get_pid (inferior_ptid), 0, t->gdb_port);
     }
 
   /* Maybe the port was never extract.  Do it now.  */
@@ -2316,7 +2316,7 @@ darwin_nat_target::get_ada_task_ptid (long lwp, long thread)
                  names_count * sizeof (mach_port_t));
 
   if (res)
-    return ptid_build (ptid_get_pid (inferior_ptid), 0, res);
+    return ptid_t (ptid_get_pid (inferior_ptid), 0, res);
   else
     return null_ptid;
 }
index f9c622cf1389526be0db1ddac49de8fc46b45a2f..8d68c72d89ab831b5ca62947bb4f21c813c703c6 100644 (file)
@@ -939,7 +939,7 @@ fbsd_add_threads (pid_t pid)
 
   for (i = 0; i < nlwps; i++)
     {
-      ptid_t ptid = ptid_build (pid, lwps[i], 0);
+      ptid_t ptid = ptid_t (pid, lwps[i], 0);
 
       if (!in_thread_list (ptid))
        {
@@ -1253,7 +1253,7 @@ fbsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
          if (ptrace (PT_LWPINFO, pid, (caddr_t) &pl, sizeof pl) == -1)
            perror_with_name (("ptrace"));
 
-         wptid = ptid_build (pid, pl.pl_lwpid, 0);
+         wptid = ptid_t (pid, pl.pl_lwpid, 0);
 
          if (debug_fbsd_nat)
            {
@@ -1357,7 +1357,7 @@ fbsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
                    perror_with_name (("ptrace"));
 
                  gdb_assert (pl.pl_flags & PL_FLAG_CHILD);
-                 child_ptid = ptid_build (child, pl.pl_lwpid, 0);
+                 child_ptid = ptid_t (child, pl.pl_lwpid, 0);
                }
 
              /* Enable additional events on the child process.  */
index c90de7c98ab225524c236f7c108abd8cbf8c3683..c20f2224c513bafae30d3a6314951289be7ddeb1 100644 (file)
@@ -1,3 +1,13 @@
+2018-07-03  Tom Tromey  <tom@tromey.com>
+
+       * linux-low.c: Update.
+       * lynx-low.c: Update.
+       * nto-low.c: Update.
+       * remote-utils.c: Update.
+       * spu-low.c: Update.
+       * thread-db.c: Update.
+       * win32-low.c: Update.
+
 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
 
        * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
index 1211944d79a97d3f252c3d3d3f326b238bc9eb61..ce4d660806b308ad75f89e09a06539a2c3b86a6a 100644 (file)
@@ -523,7 +523,7 @@ handle_extended_wait (struct lwp_info **orig_event_lwp, int wstat)
          struct thread_info *child_thr;
          struct target_desc *tdesc;
 
-         ptid = ptid_build (new_pid, new_pid, 0);
+         ptid = ptid_t (new_pid, new_pid, 0);
 
          if (debug_threads)
            {
@@ -630,7 +630,7 @@ handle_extended_wait (struct lwp_info **orig_event_lwp, int wstat)
                      "from LWP %ld, new child is LWP %ld\n",
                      lwpid_of (event_thr), new_pid);
 
-      ptid = ptid_build (pid_of (event_thr), new_pid, 0);
+      ptid = ptid_t (pid_of (event_thr), new_pid, 0);
       new_lwp = add_lwp (ptid);
 
       /* Either we're going to immediately resume the new thread
@@ -1017,7 +1017,7 @@ linux_create_inferior (const char *program,
 
   linux_add_process (pid, 0);
 
-  ptid = ptid_build (pid, pid, 0);
+  ptid = ptid_t (pid, pid, 0);
   new_lwp = add_lwp (ptid);
   new_lwp->must_set_ptrace_flags = 1;
 
@@ -1185,7 +1185,7 @@ linux_attach (unsigned long pid)
 {
   struct process_info *proc;
   struct thread_info *initial_thread;
-  ptid_t ptid = ptid_build (pid, pid, 0);
+  ptid_t ptid = ptid_t (pid, pid, 0);
   int err;
 
   /* Attach to PID.  We will check for other threads
@@ -1202,7 +1202,7 @@ linux_attach (unsigned long pid)
 
   /* Don't ignore the initial SIGSTOP if we just attached to this
      process.  It will be collected by wait shortly.  */
-  initial_thread = find_thread_ptid (ptid_build (pid, pid, 0));
+  initial_thread = find_thread_ptid (ptid_t (pid, pid, 0));
   initial_thread->last_resume_kind = resume_stop;
 
   /* We must attach to every LWP.  If /proc is mounted, use that to
@@ -2391,7 +2391,7 @@ linux_low_filter_event (int lwpid, int wstat)
                        "after exec.\n", lwpid);
        }
 
-      child_ptid = ptid_build (lwpid, lwpid, 0);
+      child_ptid = ptid_t (lwpid, lwpid, 0);
       child = add_lwp (child_ptid);
       child->stopped = 1;
       current_thread = child->thread;
index a0b9817729685f6e4aee31a48a43d77bd1d649a1..b19ea62172c5567454f99f86e08a83c95066b821 100644 (file)
@@ -64,14 +64,14 @@ lynx_debug (char *string, ...)
 /* Build a ptid_t given a PID and a LynxOS TID.  */
 
 static ptid_t
-lynx_ptid_build (int pid, long tid)
+lynx_ptid_t (int pid, long tid)
 {
   /* brobecker/2010-06-21: It looks like the LWP field in ptids
      should be distinct for each thread (see write_ptid where it
      writes the thread ID from the LWP).  So instead of storing
      the LynxOS tid in the tid field of the ptid, we store it in
      the lwp field.  */
-  return ptid_build (pid, tid, 0);
+  return ptid_t (pid, tid, 0);
 }
 
 /* Return the process ID of the given PTID.
@@ -91,7 +91,7 @@ lynx_ptid_get_pid (ptid_t ptid)
 static long
 lynx_ptid_get_tid (ptid_t ptid)
 {
-  /* See lynx_ptid_build: The LynxOS tid is stored inside the lwp field
+  /* See lynx_ptid_t: The LynxOS tid is stored inside the lwp field
      of the ptid.  */
   return ptid_get_lwp (ptid);
 }
@@ -294,7 +294,7 @@ lynx_add_threads_after_attach (int pid)
     if ((sscanf (buf, "%d %d", &thread_pid, &thread_tid) == 2
         && thread_pid == pid))
     {
-      ptid_t thread_ptid = lynx_ptid_build (pid, thread_tid);
+      ptid_t thread_ptid = lynx_ptid_t (pid, thread_tid);
 
       if (!find_thread_ptid (thread_ptid))
        {
@@ -312,7 +312,7 @@ lynx_add_threads_after_attach (int pid)
 static int
 lynx_attach (unsigned long pid)
 {
-  ptid_t ptid = lynx_ptid_build (pid, 0);
+  ptid_t ptid = lynx_ptid_t (pid, 0);
 
   if (lynx_ptrace (PTRACE_ATTACH, ptid, 0, 0, 0) != 0)
     error ("Cannot attach to process %lu: %s (%d)\n", pid,
@@ -430,7 +430,7 @@ lynx_wait_1 (ptid_t ptid, struct target_waitstatus *status, int options)
 retry:
 
   ret = lynx_waitpid (pid, &wstat);
-  new_ptid = lynx_ptid_build (ret, ((union wait *) &wstat)->w_tid);
+  new_ptid = lynx_ptid_t (ret, ((union wait *) &wstat)->w_tid);
   find_process_pid (ret)->priv->last_wait_event_ptid = new_ptid;
 
   /* If this is a new thread, then add it now.  The reason why we do
@@ -524,7 +524,7 @@ lynx_wait (ptid_t ptid, struct target_waitstatus *status, int options)
 static int
 lynx_kill (int pid)
 {
-  ptid_t ptid = lynx_ptid_build (pid, 0);
+  ptid_t ptid = lynx_ptid_t (pid, 0);
   struct target_waitstatus status;
   struct process_info *process;
 
@@ -543,7 +543,7 @@ lynx_kill (int pid)
 static int
 lynx_detach (int pid)
 {
-  ptid_t ptid = lynx_ptid_build (pid, 0);
+  ptid_t ptid = lynx_ptid_t (pid, 0);
   struct process_info *process;
 
   process = find_process_pid (pid);
index b68b8111592c667a78d98038335905c45c5f5d9c..ed2842654270b80ad516f110ec81ae322d5d07d3 100644 (file)
@@ -142,7 +142,7 @@ nto_find_new_threads (struct nto_inferior *nto_inferior)
        {
          struct thread_info *ti;
 
-         ptid = ptid_build (nto_inferior->pid, tid, 0);
+         ptid = ptid_t (nto_inferior->pid, tid, 0);
          ti = find_thread_ptid (ptid);
          if (ti != NULL)
            {
@@ -157,7 +157,7 @@ nto_find_new_threads (struct nto_inferior *nto_inferior)
       if (status.state != STATE_DEAD)
        {
          TRACE ("Adding thread %d\n", tid);
-         ptid = ptid_build (nto_inferior->pid, tid, 0);
+         ptid = ptid_t (nto_inferior->pid, tid, 0);
          if (!find_thread_ptid (ptid))
            add_thread (ptid, NULL);
        }
@@ -208,7 +208,7 @@ do_attach (pid_t pid)
       struct process_info *proc;
 
       kill (pid, SIGCONT);
-      ptid = ptid_build (status.pid, status.tid, 0);
+      ptid = ptid_t (status.pid, status.tid, 0);
       the_low_target.arch_setup ();
       proc = add_process (status.pid, 1);
       proc->tdesc = nto_tdesc;
@@ -609,7 +609,7 @@ nto_wait (ptid_t ptid,
        }
     }
 
-  return ptid_build (status.pid, status.tid, 0);
+  return ptid_t (status.pid, status.tid, 0);
 }
 
 /* Fetch inferior's registers for currently selected thread (CURRENT_INFERIOR).
@@ -740,7 +740,7 @@ static void
 nto_request_interrupt (void)
 {
   TRACE ("%s\n", __func__);
-  nto_set_thread (ptid_build (nto_inferior.pid, 1, 0));
+  nto_set_thread (ptid_t (nto_inferior.pid, 1, 0));
   if (EOK != devctl (nto_inferior.ctl_fd, DCMD_PROC_STOP, NULL, 0, 0))
     TRACE ("Error stopping inferior.\n");
 }
index 967b2f0ebb6d019710b96a62ec8c032277e5ea6a..a1a06dcdf5f7777946051ec580a9f74962bc2ff2 100644 (file)
@@ -542,7 +542,7 @@ read_ptid (const char *buf, const char **obuf)
 
       if (obuf)
        *obuf = pp;
-      return ptid_build (pid, tid, 0);
+      return ptid_t (pid, tid, 0);
     }
 
   /* No multi-process.  Just a tid.  */
@@ -555,7 +555,7 @@ read_ptid (const char *buf, const char **obuf)
 
   if (obuf)
     *obuf = pp;
-  return ptid_build (pid, tid, 0);
+  return ptid_t (pid, tid, 0);
 }
 
 /* Write COUNT bytes in BUF to the client.
index 5b880d2a42fd71658578f3f1387e8bb334e94997..13f2b353f2092c652f0fccaa95f69e1d4ff25a79 100644 (file)
@@ -297,7 +297,7 @@ spu_create_inferior (const char *program,
   proc = add_process (pid, 0);
   proc->tdesc = tdesc_spu;
 
-  ptid = ptid_build (pid, pid, 0);
+  ptid = ptid_t (pid, pid, 0);
   add_thread (ptid, NULL);
   return pid;
 }
@@ -319,7 +319,7 @@ spu_attach (unsigned long  pid)
 
   proc = add_process (pid, 1);
   proc->tdesc = tdesc_spu;
-  ptid = ptid_build (pid, pid, 0);
+  ptid = ptid_t (pid, pid, 0);
   add_thread (ptid, NULL);
   return 0;
 }
@@ -474,12 +474,12 @@ spu_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int options)
     {
       ourstatus->kind = TARGET_WAITKIND_STOPPED;
       ourstatus->value.sig = GDB_SIGNAL_0;
-      return ptid_build (ret, ret, 0);
+      return ptid_t (ret, ret, 0);
     }
 
   ourstatus->kind = TARGET_WAITKIND_STOPPED;
   ourstatus->value.sig = gdb_signal_from_host (WSTOPSIG (w));
-  return ptid_build (ret, ret, 0);
+  return ptid_t (ret, ret, 0);
 }
 
 /* Fetch inferior registers.  */
index 7dda2edba0f7da18342ff7b4683487a1a0f157ce..3e42db442047dbe6c455876b1a6189cdb0b52837 100644 (file)
@@ -215,7 +215,7 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
 {
   struct process_info *proc = current_process ();
   int pid = pid_of (proc);
-  ptid_t ptid = ptid_build (pid, ti_p->ti_lid, 0);
+  ptid_t ptid = ptid_t (pid, ti_p->ti_lid, 0);
   struct lwp_info *lwp;
   int err;
 
index 8f5ea5aa592c1207c3738adedc8be99b1f5997f9..05bea69adbd31a3c42ac43fdc8e0dd1fe9a28eb6 100644 (file)
@@ -120,7 +120,7 @@ current_thread_ptid (void)
 static ptid_t
 debug_event_ptid (DEBUG_EVENT *event)
 {
-  return ptid_build (event->dwProcessId, event->dwThreadId, 0);
+  return ptid_t (event->dwProcessId, event->dwThreadId, 0);
 }
 
 /* Get the thread context of the thread associated with TH.  */
@@ -208,7 +208,7 @@ static win32_thread_info *
 child_add_thread (DWORD pid, DWORD tid, HANDLE h, void *tlb)
 {
   win32_thread_info *th;
-  ptid_t ptid = ptid_build (pid, tid, 0);
+  ptid_t ptid = ptid_t (pid, tid, 0);
 
   if ((th = thread_rec (ptid, FALSE)))
     return th;
index c7a40400fc39f1dd1657528a75c1618720202d69..491d725ce26e3b763110dcf655ffee11e1e5a966 100644 (file)
@@ -1096,7 +1096,7 @@ inf_validate_procs (struct inf *inf)
            last = thread;
            proc_debug (thread, "new thread: %lu", threads[i]);
 
-           ptid = ptid_build (inf->pid, thread->tid, 0);
+           ptid = ptid_t (inf->pid, thread->tid, 0);
 
            /* Tell GDB's generic thread code.  */
 
@@ -1616,7 +1616,7 @@ rewait:
 
   thread = inf->wait.thread;
   if (thread)
-    ptid = ptid_build (inf->pid, thread->tid, 0);
+    ptid = ptid_t (inf->pid, thread->tid, 0);
   else if (ptid_equal (ptid, minus_one_ptid))
     thread = inf_tid_to_thread (inf, -1);
   else
@@ -1626,7 +1626,7 @@ rewait:
     {
       /* TID is dead; try and find a new thread.  */
       if (inf_update_procs (inf) && inf->threads)
-       ptid = ptid_build (inf->pid, inf->threads->tid, 0); /* The first
+       ptid = ptid_t (inf->pid, inf->threads->tid, 0); /* The first
                                                               available
                                                               thread.  */
       else
@@ -2167,7 +2167,7 @@ gnu_nat_target::create_inferior (const char *exec_file,
 
   /* We now have thread info.  */
   thread_change_ptid (inferior_ptid,
-                     ptid_build (inf->pid, inf_pick_first_thread (), 0));
+                     ptid_t (inf->pid, inf_pick_first_thread (), 0));
 
   gdb_startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED);
 
@@ -2228,7 +2228,7 @@ gnu_nat_target::attach (const char *args, int from_tty)
 
   inf_update_procs (inf);
 
-  inferior_ptid = ptid_build (pid, inf_pick_first_thread (), 0);
+  inferior_ptid = ptid_t (pid, inf_pick_first_thread (), 0);
 
   /* We have to initialize the terminal settings now, since the code
      below might try to restore them.  */
index 80f9a3eb1531f9311635566ac30efa4f5553a8f8..72695bb458cb187ee6b058e27850e80a462799c1 100644 (file)
@@ -94,7 +94,7 @@ add_fork (pid_t pid)
     }
 
   fp = XCNEW (struct fork_info);
-  fp->ptid = ptid_build (pid, pid, 0);
+  fp->ptid = ptid_t (pid, pid, 0);
   fp->num = ++highest_fork_num;
 
   if (fork_list == NULL)
index af38a2a1a5bf4b451bf25dc3b9dfd86d83d8f64c..4953615d449d2c25a5a6df8636a6c92f5b2b60a7 100644 (file)
@@ -940,7 +940,7 @@ find_lwp_pid (ptid_t ptid)
   else
     lwp = ptid_get_pid (ptid);
 
-  dummy.ptid = ptid_build (0, lwp, 0);
+  dummy.ptid = ptid_t (0, lwp, 0);
   lp = (struct lwp_info *) htab_find (lwp_lwpid_htab, &dummy);
   return lp;
 }
@@ -1196,9 +1196,9 @@ linux_nat_target::attach (const char *args, int from_tty)
 
   /* The ptrace base target adds the main thread with (pid,0,0)
      format.  Decorate it with lwp info.  */
-  ptid = ptid_build (ptid_get_pid (inferior_ptid),
-                    ptid_get_pid (inferior_ptid),
-                    0);
+  ptid = ptid_t (ptid_get_pid (inferior_ptid),
+                ptid_get_pid (inferior_ptid),
+                0);
   thread_change_ptid (inferior_ptid, ptid);
 
   /* Add the initial process as the first LWP to the list.  */
@@ -1958,7 +1958,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status)
                            _("wait returned unexpected status 0x%x"), status);
        }
 
-      ourstatus->value.related_pid = ptid_build (new_pid, new_pid, 0);
+      ourstatus->value.related_pid = ptid_t (new_pid, new_pid, 0);
 
       if (event == PTRACE_EVENT_FORK || event == PTRACE_EVENT_VFORK)
        {
@@ -1977,7 +1977,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status)
 
          /* This won't actually modify the breakpoint list, but will
             physically remove the breakpoints from the child.  */
-         detach_breakpoints (ptid_build (new_pid, new_pid, 0));
+         detach_breakpoints (ptid_t (new_pid, new_pid, 0));
 
          /* Retain child fork in ptrace (stopped) state.  */
          if (!find_fork_pid (new_pid))
@@ -2008,7 +2008,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status)
                                "from LWP %d, new child is LWP %ld\n",
                                pid, new_pid);
 
-         new_lp = add_lwp (ptid_build (ptid_get_pid (lp->ptid), new_pid, 0));
+         new_lp = add_lwp (ptid_t (ptid_get_pid (lp->ptid), new_pid, 0));
          new_lp->stopped = 1;
          new_lp->resumed = 1;
 
@@ -2944,7 +2944,7 @@ linux_nat_filter_event (int lwpid, int status)
                            "LLW: Re-adding thread group leader LWP %d.\n",
                            lwpid);
 
-      lp = add_lwp (ptid_build (lwpid, lwpid, 0));
+      lp = add_lwp (ptid_t (lwpid, lwpid, 0));
       lp->stopped = 1;
       lp->resumed = 1;
       add_thread (lp->ptid);
@@ -3259,8 +3259,8 @@ linux_nat_wait_1 (ptid_t ptid, struct target_waitstatus *ourstatus,
     {
       /* Upgrade the main thread's ptid.  */
       thread_change_ptid (inferior_ptid,
-                         ptid_build (ptid_get_pid (inferior_ptid),
-                                     ptid_get_pid (inferior_ptid), 0));
+                         ptid_t (ptid_get_pid (inferior_ptid),
+                                 ptid_get_pid (inferior_ptid), 0));
 
       lp = add_initial_lwp (inferior_ptid);
       lp->resumed = 1;
@@ -4241,7 +4241,7 @@ linux_nat_target::static_tracepoint_markers_by_strid (const char *strid)
   int pid = ptid_get_pid (inferior_ptid);
   std::vector<static_tracepoint_marker> markers;
   const char *p = s;
-  ptid_t ptid = ptid_build (pid, 0, 0);
+  ptid_t ptid = ptid_t (pid, 0, 0);
   static_tracepoint_marker marker;
 
   /* Pause all */
index e6a5381d9503f94c6535efebd6b133a86cf1bad1..b67bd5d00dca56e05202b1232e216f12782c0935 100644 (file)
@@ -674,7 +674,7 @@ check_thread_db_callback (const td_thrhandle_t *th, void *arg)
      calls are made, we just assume they were; future changes
      to how GDB accesses TLS could result in this passing
      without exercising the calls it's supposed to.  */
-  ptid_t ptid = ptid_build (tdb_testinfo->info->pid, ti.ti_lid, 0);
+  ptid_t ptid = ptid_t (tdb_testinfo->info->pid, ti.ti_lid, 0);
   struct thread_info *thread_info = find_thread_ptid (ptid);
   if (thread_info != NULL && thread_info->priv != NULL)
     {
@@ -1784,7 +1784,7 @@ ptid_t
 thread_db_target::get_ada_task_ptid (long lwp, long thread)
 {
   /* NPTL uses a 1:1 model, so the LWP id suffices.  */
-  return ptid_build (ptid_get_pid (inferior_ptid), lwp, 0);
+  return ptid_t (ptid_get_pid (inferior_ptid), lwp, 0);
 }
 
 void
index 877b31b0b2f237d57034c7c06d10d53c256dfe86..1f3a911473ffcb0c75b86a8a4c7baf08d6af289a 100644 (file)
@@ -266,8 +266,8 @@ get_cores_used_by_process (PID_T pid, int *cores, const int num_cores)
            continue;
 
          sscanf (dp->d_name, "%lld", &tid);
-         core = linux_common_core_of_thread (ptid_build ((pid_t) pid,
-                                                         (pid_t) tid, 0));
+         core = linux_common_core_of_thread (ptid_t ((pid_t) pid,
+                                                     (pid_t) tid, 0));
 
          if (core >= 0 && core < num_cores)
            {
@@ -595,7 +595,7 @@ linux_xfer_osdata_threads (gdb_byte *readbuf,
                            continue;
 
                          tid = atoi (dp2->d_name);
-                         core = linux_common_core_of_thread (ptid_build (pid, tid, 0));
+                         core = linux_common_core_of_thread (ptid_t (pid, tid, 0));
 
                          buffer_xml_printf (
                            &buffer,
index 55487507d00cf7b519e36dff86d5abfc2a5dbc46..5a9464195df6b001b1403d6fdf0f8caf92e9599f 100644 (file)
@@ -308,7 +308,7 @@ linux_proc_attach_tgid_threads (pid_t pid,
          lwp = strtoul (dp->d_name, NULL, 10);
          if (lwp != 0)
            {
-             ptid_t ptid = ptid_build (pid, lwp, 0);
+             ptid_t ptid = ptid_t (pid, lwp, 0);
 
              if (attach_lwp (ptid))
                new_threads_found = 1;
index a572fc166c72e7a8f101301a9d2efbca58e57058..c1b38e861629cdc13f3e471ce5902f3f876f77b6 100644 (file)
@@ -413,7 +413,7 @@ nto_procfs_target::update_thread_list ()
           returned different tid, meaning the requested tid no longer exists
           (e.g. thread exited).  */
        continue;
-      ptid = ptid_build (pid, 0, tid);
+      ptid = ptid_t (pid, 0, tid);
       new_thread = find_thread_ptid (ptid);
       if (!new_thread)
        new_thread = add_thread (ptid);
@@ -766,7 +766,7 @@ do_attach (ptid_t ptid)
       && status.flags & _DEBUG_FLAG_STOPPED)
     SignalKill (nto_node (), ptid_get_pid (ptid), 0, SIGCONT, 0, 0);
   nto_init_solib_absolute_prefix ();
-  return ptid_build (ptid_get_pid (ptid), 0, status.tid);
+  return ptid_t (ptid_get_pid (ptid), 0, status.tid);
 }
 
 /* Ask the user what to do when an interrupt is received.  */
@@ -899,7 +899,7 @@ nto_procfs_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
        }
     }
 
-  return ptid_build (status.pid, 0, status.tid);
+  return ptid_t (status.pid, 0, status.tid);
 }
 
 /* Read the current values of the inferior's registers, both the
index 91bed717a56bd18af3eb90ee616497522743e276..08e873d11f32ba0e37753baed3532cb74260f788 100644 (file)
@@ -62,7 +62,7 @@ obsd_nat_target::update_thread_list ()
 
   while (pts.pts_tid != -1)
     {
-      ptid_t ptid = ptid_build (pid, pts.pts_tid, 0);
+      ptid_t ptid = ptid_t (pid, pts.pts_tid, 0);
 
       if (!in_thread_list (ptid))
        {
@@ -151,7 +151,7 @@ obsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
          return pid_to_ptid (pid);
        }
 
-      ptid = ptid_build (pid, pe.pe_tid, 0);
+      ptid = ptid_t (pid, pe.pe_tid, 0);
       if (!in_thread_list (ptid))
        {
          if (ptid_get_lwp (inferior_ptid) == 0)
index ab959b785428e93639ea2d50585654153fe9895c..35931e26c6fdbfcb056f4b289d337d7a65d11ce5 100644 (file)
@@ -1996,7 +1996,7 @@ do_attach (ptid_t ptid)
   create_procinfo (pi->pid, lwpid);
 
   /* Add it to gdb's thread list.  */
-  ptid = ptid_build (pi->pid, lwpid, 0);
+  ptid = ptid_t (pi->pid, lwpid, 0);
   add_thread (ptid);
 
   return ptid;
@@ -2283,7 +2283,7 @@ wait_again:
 
              /* The 'pid' we will return to GDB is composed of
                 the process ID plus the lwp ID.  */
-             retval = ptid_build (pi->pid, proc_get_current_thread (pi), 0);
+             retval = ptid_t (pi->pid, proc_get_current_thread (pi), 0);
 
              switch (why) {
              case PR_SIGNALLED:
@@ -2400,7 +2400,7 @@ wait_again:
                    if (!find_procinfo (pi->pid, temp_tid))
                      create_procinfo  (pi->pid, temp_tid);
 
-                   temp_ptid = ptid_build (pi->pid, temp_tid, 0);
+                   temp_ptid = ptid_t (pi->pid, temp_tid, 0);
                    /* If not in GDB's thread list, add it.  */
                    if (!in_thread_list (temp_ptid))
                      add_thread (temp_ptid);
@@ -2468,7 +2468,7 @@ wait_again:
                      create_procinfo  (pi->pid, temp_tid);
 
                    /* If not in GDB's thread list, add it.  */
-                   temp_ptid = ptid_build (pi->pid, temp_tid, 0);
+                   temp_ptid = ptid_t (pi->pid, temp_tid, 0);
                    if (!in_thread_list (temp_ptid))
                      add_thread (temp_ptid);
 
@@ -2960,7 +2960,7 @@ procfs_init_inferior (struct target_ops *ops, int pid)
      this point, but it didn't have any lwp info yet.  Notify the core
      about it.  This changes inferior_ptid as well.  */
   thread_change_ptid (pid_to_ptid (pid),
-                     ptid_build (pid, lwpid, 0));
+                     ptid_t (pid, lwpid, 0));
 
   gdb_startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED);
 }
@@ -3143,7 +3143,7 @@ procfs_inferior_created (struct target_ops *ops, int from_tty)
 static int
 procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr)
 {
-  ptid_t gdb_threadid = ptid_build (pi->pid, thread->tid, 0);
+  ptid_t gdb_threadid = ptid_t (pi->pid, thread->tid, 0);
 
   if (!in_thread_list (gdb_threadid) || is_exited (gdb_threadid))
     add_thread (gdb_threadid);
@@ -3807,7 +3807,7 @@ procfs_corefile_thread_callback (procinfo *pi, procinfo *thread, void *data)
 
   if (pi != NULL)
     {
-      ptid_t ptid = ptid_build (pi->pid, thread->tid, 0);
+      ptid_t ptid = ptid_t (pi->pid, thread->tid, 0);
 
       args->note_data = procfs_do_thread_registers (args->obfd, ptid,
                                                    args->note_data,
index 01f58ee7888bb9d1c2acc51402894a08932cddbd..d269f388f5d24168cb5ab13be795e6d8ed915705 100644 (file)
@@ -211,7 +211,7 @@ get_base_thread_from_ravenscar_task (ptid_t ptid)
     return ptid;
 
   base_cpu = ravenscar_get_thread_base_cpu (ptid);
-  return ptid_build (ptid_get_pid (ptid), base_cpu, 0);
+  return ptid_t (ptid_get_pid (ptid), base_cpu, 0);
 }
 
 /* Fetch the ravenscar running thread from target memory and
@@ -384,7 +384,7 @@ ravenscar_active_task (int cpu)
   if (tid == 0)
     return null_ptid;
   else
-    return ptid_build (ptid_get_pid (base_ptid), 0, tid);
+    return ptid_t (ptid_get_pid (base_ptid), 0, tid);
 }
 
 const char *
@@ -571,7 +571,7 @@ ravenscar_inferior_created (struct target_ops *target, int from_tty)
 ptid_t
 ravenscar_thread_target::get_ada_task_ptid (long lwp, long thread)
 {
-  return ptid_build (ptid_get_pid (base_ptid), 0, thread);
+  return ptid_t (ptid_get_pid (base_ptid), 0, thread);
 }
 
 /* Command-list for the "set/show ravenscar" prefix command.  */
index 29bfe1dc7e163d42312904db661ccf2e796725b4..4561564c31aff9bb5d01b5f858beebb3e3bc9aee 100644 (file)
@@ -253,7 +253,7 @@ get_sim_inferior_data (struct inferior *inf, int sim_instance_needed)
       set_inferior_data (inf, sim_inferior_data_key, sim_data);
 
       /* Allocate a ptid for this inferior.  */
-      sim_data->remote_sim_ptid = ptid_build (next_pid, 0, next_pid);
+      sim_data->remote_sim_ptid = ptid_t (next_pid, 0, next_pid);
       next_pid++;
 
       /* Initialize the other instance variables.  */
index f88e801dbef1b5c0635afefe1ef7a57be9970656..31118d25423b7b040fb4713a2e46c5c5888e9a6e 100644 (file)
@@ -2955,7 +2955,7 @@ read_ptid (const char *buf, const char **obuf)
       pp = unpack_varlen_hex (p + 1, &tid);
       if (obuf)
        *obuf = pp;
-      return ptid_build (pid, tid, 0);
+      return ptid_t (pid, tid, 0);
     }
 
   /* No multi-process.  Just a tid.  */
@@ -2980,7 +2980,7 @@ read_ptid (const char *buf, const char **obuf)
 
   if (obuf)
     *obuf = pp;
-  return ptid_build (pid, tid, 0);
+  return ptid_t (pid, tid, 0);
 }
 
 static int
@@ -3972,7 +3972,7 @@ remote_target::static_tracepoint_markers_by_strid (const char *strid)
 ptid_t
 remote_target::get_ada_task_ptid (long lwp, long thread)
 {
-  return ptid_build (ptid_get_pid (inferior_ptid), lwp, 0);
+  return ptid_t (ptid_get_pid (inferior_ptid), lwp, 0);
 }
 \f
 
@@ -6037,7 +6037,7 @@ remote_target::append_resumption (char *p, char *endp,
       ptid_t nptid;
 
       /* All (-1) threads of process.  */
-      nptid = ptid_build (ptid_get_pid (ptid), -1, 0);
+      nptid = ptid_t (ptid_get_pid (ptid), -1, 0);
 
       p += xsnprintf (p, endp - p, ":");
       p = write_ptid (p, endp, nptid);
@@ -6615,7 +6615,7 @@ remote_target::remote_stop_ns (ptid_t ptid)
 
       if (ptid_is_pid (ptid))
          /* All (-1) threads of process.  */
-       nptid = ptid_build (ptid_get_pid (ptid), -1, 0);
+       nptid = ptid_t (ptid_get_pid (ptid), -1, 0);
       else
        {
          /* Small optimization: if we already have a stop reply for
@@ -11321,7 +11321,7 @@ threadalive_test (const char *cmd, int tty)
 {
   int sample_thread = SAMPLE_THREAD;
   int pid = ptid_get_pid (inferior_ptid);
-  ptid_t ptid = ptid_build (pid, sample_thread, 0);
+  ptid_t ptid = ptid_t (pid, sample_thread, 0);
 
   if (remote_thread_alive (ptid))
     printf_filtered ("PASS: Thread alive test\n");
@@ -14737,7 +14737,7 @@ stepping is supported by the target.  The default is on."),
 
   /* Take advantage of the fact that the TID field is not used, to tag
      special ptids with it set to != 0.  */
-  magic_null_ptid = ptid_build (42000, -1, 1);
-  not_sent_ptid = ptid_build (42000, -2, 1);
-  any_thread_ptid = ptid_build (42000, 0, 1);
+  magic_null_ptid = ptid_t (42000, -1, 1);
+  not_sent_ptid = ptid_t (42000, -2, 1);
+  any_thread_ptid = ptid_t (42000, 0, 1);
 }
index 47d86e469cacac64e813db001b8466b5f873b26d..d67fd8352f6bbe19d6127a8bb952fd5e463b6fd7 100644 (file)
@@ -325,7 +325,7 @@ thread_to_lwp (ptid_t thread_id, int default_lwp)
             td_state_string (ti.ti_state));
     }
 
-  return ptid_build (ptid_get_pid (thread_id), ti.ti_lid, 0);
+  return ptid_t (ptid_get_pid (thread_id), ti.ti_lid, 0);
 }
 
 /* Convert an LWP ID into a POSIX or Solaris thread ID.  If LWP_ID
@@ -366,7 +366,7 @@ lwp_to_thread (ptid_t lwp)
   else if (val != TD_OK)
     error (_("lwp_to_thread: td_thr_get_info: %s."), td_err_string (val));
 
-  return ptid_build (ptid_get_pid (lwp), 0 , ti.ti_tid);
+  return ptid_t (ptid_get_pid (lwp), 0 , ti.ti_tid);
 }
 \f
 
@@ -849,7 +849,7 @@ ps_ptwrite (struct ps_prochandle *ph, psaddr_t addr,
 ps_err_e
 ps_lgetregs (struct ps_prochandle *ph, lwpid_t lwpid, prgregset_t gregset)
 {
-  ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
+  ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
   struct regcache *regcache
     = get_thread_arch_regcache (ptid, target_gdbarch ());
 
@@ -865,7 +865,7 @@ ps_err_e
 ps_lsetregs (struct ps_prochandle *ph, lwpid_t lwpid,
             const prgregset_t gregset)
 {
-  ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
+  ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
   struct regcache *regcache
     = get_thread_arch_regcache (ptid, target_gdbarch ());
 
@@ -917,7 +917,7 @@ ps_err_e
 ps_lgetfpregs (struct ps_prochandle *ph, lwpid_t lwpid,
               prfpregset_t *fpregset)
 {
-  ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
+  ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
   struct regcache *regcache
     = get_thread_arch_regcache (ptid, target_gdbarch ());
 
@@ -933,7 +933,7 @@ ps_err_e
 ps_lsetfpregs (struct ps_prochandle *ph, lwpid_t lwpid,
               const prfpregset_t * fpregset)
 {
-  ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
+  ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
   struct regcache *regcache
     = get_thread_arch_regcache (ptid, target_gdbarch ());
 
@@ -982,7 +982,7 @@ ps_lgetLDT (struct ps_prochandle *ph, lwpid_t lwpid,
   if (ptid_get_pid (inferior_ptid) <= 0 || lwpid <= 0)
     return PS_BADLID;
 
-  ret = procfs_find_LDT_entry (ptid_build (ptid_get_pid (inferior_ptid),
+  ret = procfs_find_LDT_entry (ptid_t (ptid_get_pid (inferior_ptid),
                               lwpid, 0));
   if (ret)
     {
@@ -1042,7 +1042,7 @@ sol_update_thread_list_callback (const td_thrhandle_t *th, void *ignored)
   if (retval != TD_OK)
     return -1;
 
-  ptid = ptid_build (ptid_get_pid (inferior_ptid), 0, ti.ti_tid);
+  ptid = ptid_t (ptid_get_pid (inferior_ptid), 0, ti.ti_tid);
   if (!in_thread_list (ptid) || is_exited (ptid))
     add_thread (ptid);
 
index f560816a984d4d3d967dbdaab5030352760e3786..909d181d7f8a94ccbcd5b9a293bf36e4f232c519 100644 (file)
@@ -618,7 +618,7 @@ default_terminal_info (struct target_ops *self, const char *args, int from_tty)
 static ptid_t
 default_get_ada_task_ptid (struct target_ops *self, long lwp, long tid)
 {
-  return ptid_build (ptid_get_pid (inferior_ptid), lwp, tid);
+  return ptid_t (ptid_get_pid (inferior_ptid), lwp, tid);
 }
 
 static enum exec_direction_kind
index 35ad8655342f579b3c2fb8373e9fc97f4200cd46..0453ce3bf6d297252103a1055027f77292a82f7f 100644 (file)
@@ -1371,8 +1371,8 @@ fake_create_process (void)
     }
   main_thread_id = current_event.dwThreadId;
   current_thread = windows_add_thread (
-                    ptid_build (current_event.dwProcessId, 0,
-                                current_event.dwThreadId),
+                    ptid_t (current_event.dwProcessId, 0,
+                            current_event.dwThreadId),
                     current_event.u.CreateThread.hThread,
                     current_event.u.CreateThread.lpThreadLocalBase);
   return main_thread_id;
@@ -1544,8 +1544,8 @@ get_windows_debug_event (struct target_ops *ops,
        }
       /* Record the existence of this thread.  */
       thread_id = current_event.dwThreadId;
-      th = windows_add_thread (ptid_build (current_event.dwProcessId, 0,
-                                        current_event.dwThreadId),
+      th = windows_add_thread (ptid_t (current_event.dwProcessId, 0,
+                                      current_event.dwThreadId),
                             current_event.u.CreateThread.hThread,
                             current_event.u.CreateThread.lpThreadLocalBase);
 
@@ -1559,8 +1559,8 @@ get_windows_debug_event (struct target_ops *ops,
 
       if (current_event.dwThreadId != main_thread_id)
        {
-         windows_delete_thread (ptid_build (current_event.dwProcessId, 0,
-                                            current_event.dwThreadId),
+         windows_delete_thread (ptid_t (current_event.dwProcessId, 0,
+                                        current_event.dwThreadId),
                                 current_event.u.ExitThread.dwExitCode);
          th = &dummy_thread_info;
        }
@@ -1577,13 +1577,13 @@ get_windows_debug_event (struct target_ops *ops,
 
       current_process_handle = current_event.u.CreateProcessInfo.hProcess;
       if (main_thread_id)
-       windows_delete_thread (ptid_build (current_event.dwProcessId, 0,
-                                          main_thread_id),
+       windows_delete_thread (ptid_t (current_event.dwProcessId, 0,
+                                      main_thread_id),
                               0);
       main_thread_id = current_event.dwThreadId;
       /* Add the main thread.  */
-      th = windows_add_thread (ptid_build (current_event.dwProcessId, 0,
-                                          current_event.dwThreadId),
+      th = windows_add_thread (ptid_t (current_event.dwProcessId, 0,
+                                      current_event.dwThreadId),
             current_event.u.CreateProcessInfo.hThread,
             current_event.u.CreateProcessInfo.lpThreadLocalBase);
       thread_id = current_event.dwThreadId;
@@ -1685,8 +1685,7 @@ get_windows_debug_event (struct target_ops *ops,
     }
   else
     {
-      inferior_ptid = ptid_build (current_event.dwProcessId, 0,
-                                 thread_id);
+      inferior_ptid = ptid_t (current_event.dwProcessId, 0, thread_id);
       current_thread = th;
       if (!current_thread)
        current_thread = thread_rec (thread_id, TRUE);
@@ -1746,7 +1745,7 @@ windows_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
       SetConsoleCtrlHandler (&ctrl_c_handler, FALSE);
 
       if (retval)
-       return ptid_build (current_event.dwProcessId, 0, retval);
+       return ptid_t (current_event.dwProcessId, 0, retval);
       else
        {
          int detach = 0;
@@ -3021,7 +3020,7 @@ windows_nat_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr)
 ptid_t
 windows_nat_target::get_ada_task_ptid (long lwp, long thread)
 {
-  return ptid_build (ptid_get_pid (inferior_ptid), 0, lwp);
+  return ptid_t (ptid_get_pid (inferior_ptid), 0, lwp);
 }
 
 /* Implementation of the to_thread_name method.  */
This page took 0.055879 seconds and 4 git commands to generate.