gdbserver: Ensure all debug output uses debug functions
[deliverable/binutils-gdb.git] / gdb / gdbserver / spu-low.c
index e9fc6e7beb4489bf450a6a977a51659f4b3f3753..97f985ae8f832c975fd31cdd22b7996f5aa575b3 100644 (file)
@@ -1,5 +1,5 @@
 /* Low level interface to SPUs, for the remote server for GDB.
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2019 Free Software Foundation, Inc.
 
    Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
 
 
 #include "server.h"
 
-#include "gdb_wait.h"
+#include "common/gdb_wait.h"
 #include <sys/ptrace.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/syscall.h>
-#include "filestuff.h"
+#include "common/filestuff.h"
 #include "hostio.h"
 #include "nat/fork-inferior.h"
 
@@ -326,12 +326,10 @@ spu_attach (unsigned long  pid)
 
 /* Kill the inferior process.  */
 static int
-spu_kill (int pid)
+spu_kill (process_info *process)
 {
   int status, ret;
-  struct process_info *process = find_process_pid (pid);
-  if (process == NULL)
-    return -1;
+  int pid = process->pid;
 
   ptrace (PTRACE_KILL, pid, 0, 0);
 
@@ -348,13 +346,9 @@ spu_kill (int pid)
 
 /* Detach from inferior process.  */
 static int
-spu_detach (int pid)
+spu_detach (process_info *process)
 {
-  struct process_info *process = find_process_pid (pid);
-  if (process == NULL)
-    return -1;
-
-  ptrace (PTRACE_DETACH, pid, 0, 0);
+  ptrace (PTRACE_DETACH, process->pid, 0, 0);
 
   clear_inferiors ();
   remove_process (process);
This page took 0.024267 seconds and 4 git commands to generate.