Delete unused variable in lynx_attach.
[deliverable/binutils-gdb.git] / gdb / gdbserver / lynx-low.c
index 2c7ab6e3dfa193fe433bf2eece609d3c419fcbd1..29f5e6237a2228bf675e4dbbc7c48b3f3ba5977b 100644 (file)
@@ -25,7 +25,7 @@
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
-#include <sys/wait.h>
+#include "gdb_wait.h"
 #include <signal.h>
 
 int using_threads = 1;
@@ -255,9 +255,11 @@ ptrace_request_to_str (int request)
       case PTRACE_GETLOADINFO:
         return "PTRACE_GETLOADINFO";
         break;
+#ifdef PTRACE_GETTHREADLIST
       case PTRACE_GETTHREADLIST:
         return "PTRACE_GETTHREADLIST";
         break;
+#endif
     }
   return "<unknown-request>";
 }
@@ -291,7 +293,6 @@ lynx_ptrace (int request, ptid_t ptid, int addr, int data, int addr2)
 static int
 lynx_create_inferior (char *program, char **allargs)
 {
-  struct process_info *new_process;
   int pid;
 
   lynx_debug ("lynx_create_inferior ()");
@@ -316,7 +317,7 @@ lynx_create_inferior (char *program, char **allargs)
       _exit (0177);
     }
 
-  new_process = add_process (pid, 0);
+  add_process (pid, 0);
   /* Do not add the process thread just yet, as we do not know its tid.
      We will add it later, during the wait for the STOP event corresponding
      to the lynx_ptrace (PTRACE_TRACEME) call above.  */
@@ -328,14 +329,13 @@ lynx_create_inferior (char *program, char **allargs)
 static int
 lynx_attach (unsigned long pid)
 {
-  struct process_info *new_process;
   ptid_t ptid = lynx_ptid_build (pid, 0);
 
   if (lynx_ptrace (PTRACE_ATTACH, ptid, 0, 0, 0) != 0)
     error ("Cannot attach to process %lu: %s (%d)\n", pid,
           strerror (errno), errno);
 
-  new_process = add_process (pid, 1);
+  add_process (pid, 1);
   add_thread (ptid, NULL);
 
   return 0;
This page took 0.025225 seconds and 4 git commands to generate.