]> Git Repo - binutils.git/blobdiff - gdb/inf-ttrace.c
daily update
[binutils.git] / gdb / inf-ttrace.c
index 919515f7fbcf6ead0d662b5963c97bf54ba688ea..847beb3f675670484eb23af37bfea10cf8f567a7 100644 (file)
@@ -29,9 +29,6 @@
 #include "inferior.h"
 #include "terminal.h"
 #include "target.h"
-
-#include "gdb_assert.h"
-#include <string.h>
 #include <sys/mman.h>
 #include <sys/ttrace.h>
 #include <signal.h>
@@ -368,7 +365,8 @@ inf_ttrace_can_use_hw_breakpoint (struct target_ops *self,
 }
 
 static int
-inf_ttrace_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+inf_ttrace_region_ok_for_hw_watchpoint (struct target_ops *self,
+                                       CORE_ADDR addr, int len)
 {
   return 1;
 }
@@ -643,7 +641,8 @@ inf_ttrace_him (struct target_ops *ops, int pid)
 
   do_cleanups (old_chain);
 
-  push_target (ops);
+  if (!target_is_pushed (ops))
+    push_target (ops);
 
   startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
 
@@ -694,8 +693,7 @@ inf_ttrace_mourn_inferior (struct target_ops *ops)
     }
   inf_ttrace_page_dict.count = 0;
 
-  unpush_target (ops);
-  generic_mourn_inferior ();
+  inf_child_mourn_inferior (ops);
 }
 
 /* Assuming we just attached the debugger to a new inferior, create
@@ -746,7 +744,7 @@ inf_ttrace_create_threads_after_attach (int pid)
 }
 
 static void
-inf_ttrace_attach (struct target_ops *ops, char *args, int from_tty)
+inf_ttrace_attach (struct target_ops *ops, const char *args, int from_tty)
 {
   char *exec_file;
   pid_t pid;
@@ -795,7 +793,8 @@ inf_ttrace_attach (struct target_ops *ops, char *args, int from_tty)
              (uintptr_t)&tte, sizeof tte, 0) == -1)
     perror_with_name (("ttrace"));
 
-  push_target (ops);
+  if (!target_is_pushed (ops))
+    push_target (ops);
 
   inf_ttrace_create_threads_after_attach (pid);
 }
@@ -836,7 +835,7 @@ inf_ttrace_detach (struct target_ops *ops, const char *args, int from_tty)
   inferior_ptid = null_ptid;
   detach_inferior (pid);
 
-  unpush_target (ops);
+  inf_child_maybe_unpush_target (ops);
 }
 
 static void
@@ -1281,7 +1280,8 @@ inf_ttrace_thread_alive (struct target_ops *ops, ptid_t ptid)
    INFO.  */
 
 static char *
-inf_ttrace_extra_thread_info (struct thread_info *info)
+inf_ttrace_extra_thread_info (struct target_ops *self,
+                             struct thread_info *info)
 {
   struct inf_ttrace_private_thread_info* private =
     (struct inf_ttrace_private_thread_info *) info->private;
@@ -1312,7 +1312,7 @@ inf_ttrace_pid_to_str (struct target_ops *ops, ptid_t ptid)
 /* Implement the get_ada_task_ptid target_ops method.  */
 
 static ptid_t
-inf_ttrace_get_ada_task_ptid (long lwp, long thread)
+inf_ttrace_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
 {
   return ptid_build (ptid_get_pid (inferior_ptid), lwp, 0);
 }
This page took 0.028304 seconds and 4 git commands to generate.