Remove Cell Broadband Engine debugging support
[deliverable/binutils-gdb.git] / gdb / gdbserver / nto-low.c
index ed2842654270b80ad516f110ec81ae322d5d07d3..3c1130680f25b22d3f447757a3664e50a24aa752 100644 (file)
@@ -1,6 +1,6 @@
 /* QNX Neutrino specific low level interface, for the remote server
    for GDB.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -91,13 +91,13 @@ nto_set_thread (ptid_t ptid)
 {
   int res = 0;
 
-  TRACE ("%s pid: %d tid: %ld\n", __func__, ptid_get_pid (ptid),
-        ptid_get_lwp (ptid));
+  TRACE ("%s pid: %d tid: %ld\n", __func__, ptid.pid (),
+        ptid.lwp ());
   if (nto_inferior.ctl_fd != -1
-      && !ptid_equal (ptid, null_ptid)
-      && !ptid_equal (ptid, minus_one_ptid))
+      && ptid != null_ptid
+      && ptid != minus_one_ptid)
     {
-      pthread_t tid = ptid_get_lwp (ptid);
+      pthread_t tid = ptid.lwp ();
 
       if (EOK == devctl (nto_inferior.ctl_fd, DCMD_PROC_CURTHREAD, &tid,
          sizeof (tid), 0))
@@ -213,7 +213,7 @@ do_attach (pid_t pid)
       proc = add_process (status.pid, 1);
       proc->tdesc = nto_tdesc;
       TRACE ("Adding thread: pid=%d tid=%ld\n", status.pid,
-            ptid_get_lwp (ptid));
+            ptid.lwp ());
       nto_find_new_threads (&nto_inferior);
     }
   else
@@ -397,8 +397,10 @@ nto_attach (unsigned long pid)
 /* Send signal to process PID.  */
 
 static int
-nto_kill (int pid)
+nto_kill (process_info *proc)
 {
+  int pid = proc->pid;
+
   TRACE ("%s %d\n", __func__, pid);
   kill (pid, SIGKILL);
   do_detach ();
@@ -408,9 +410,9 @@ nto_kill (int pid)
 /* Detach from process PID.  */
 
 static int
-nto_detach (int pid)
+nto_detach (process_info *proc)
 {
-  TRACE ("%s %d\n", __func__, pid);
+  TRACE ("%s %d\n", __func__, proc->pid);
   do_detach ();
   return 0;
 }
@@ -430,9 +432,9 @@ nto_thread_alive (ptid_t ptid)
 {
   int res;
 
-  TRACE ("%s pid:%d tid:%d\n", __func__, ptid_get_pid (ptid),
-        ptid_get_lwp (ptid));
-  if (SignalKill (0, ptid_get_pid (ptid), ptid_get_lwp (ptid),
+  TRACE ("%s pid:%d tid:%d\n", __func__, ptid.pid (),
+        ptid.lwp ());
+  if (SignalKill (0, ptid.pid (), ptid.lwp (),
                  0, 0, 0) == -1)
     res = 0;
   else
@@ -582,7 +584,7 @@ nto_wait (ptid_t ptid,
            int waitval = 0;
 
            TRACE ("  TERMINATED\n");
-           waitpid (ptid_get_pid (ptid), &waitval, WNOHANG);
+           waitpid (ptid.pid (), &waitval, WNOHANG);
            if (nto_inferior.exit_signo)
              {
                /* Abnormal death.  */
@@ -961,7 +963,6 @@ static struct target_ops nto_target_ops = {
   nto_stopped_data_address,
   NULL, /* nto_read_offsets */
   NULL, /* thread_db_set_tls_address */
-  NULL,
   hostio_last_error_from_errno,
   NULL, /* nto_qxfer_osdata */
   NULL, /* xfer_siginfo */
This page took 0.025431 seconds and 4 git commands to generate.