(TARGET_FORMAT): Remove LynxOS COFF definition.
[deliverable/binutils-gdb.git] / gdb / linux-nat.c
index 8ecabdace6916ebdcabda4c152a8d8174e579cca..8ceb1e71bd9c90f5492b7c265f79710685568da8 100644 (file)
@@ -83,8 +83,6 @@
 
 static int debug_linux_nat;
 
-extern struct target_ops child_ops;
-
 static int linux_parent_pid;
 
 struct simple_pid_list
@@ -524,12 +522,12 @@ kill_inferior (void)
       || last.kind == TARGET_WAITKIND_VFORKED)
     {
       ptrace (PT_KILL, last.value.related_pid, 0, 0);
-      ptrace_wait (null_ptid, &status);
+      wait (&status);
     }
 
   /* Kill the current process.  */
   ptrace (PT_KILL, pid, 0, 0);
-  ret = ptrace_wait (null_ptid, &status);
+  ret = wait (&status);
 
   /* We might get a SIGCHLD instead of an exit status.  This is
      aggravated by the first kill above - a child has just died.  */
@@ -537,7 +535,7 @@ kill_inferior (void)
   while (ret == pid && WIFSTOPPED (status))
     {
       ptrace (PT_KILL, pid, 0, 0);
-      ret = ptrace_wait (null_ptid, &status);
+      ret = wait (&status);
     }
 
   target_mourn_inferior ();
@@ -599,9 +597,6 @@ ptid_t trap_ptid;
 /* This module's target-specific operations.  */
 static struct target_ops linux_nat_ops;
 
-/* The standard child operations.  */
-extern struct target_ops child_ops;
-
 /* Since we cannot wait (in linux_nat_wait) for the initial process and
    any cloned processes with a single call to waitpid, we have to use
    the WNOHANG flag and call waitpid in a loop.  To optimize
@@ -3016,11 +3011,9 @@ _initialize_linux_nat (void)
 {
   struct sigaction action;
   extern void thread_db_init (struct target_ops *);
-  extern void inftarg_set_find_memory_regions ();
-  extern void inftarg_set_make_corefile_notes ();
 
-  inftarg_set_find_memory_regions (linux_nat_find_memory_regions);
-  inftarg_set_make_corefile_notes (linux_nat_make_corefile_notes);
+  child_ops.to_find_memory_regions = linux_nat_find_memory_regions;
+  child_ops.to_make_corefile_notes = linux_nat_make_corefile_notes;
 
   add_info ("proc", linux_nat_info_proc_cmd,
            "Show /proc process information about any running process.\n\
This page took 0.025276 seconds and 4 git commands to generate.