#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>
}
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;
}
do_cleanups (old_chain);
- push_target (ops);
+ if (!target_is_pushed (ops))
+ push_target (ops);
startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
}
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
}
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;
(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);
}
inferior_ptid = null_ptid;
detach_inferior (pid);
- unpush_target (ops);
+ inf_child_maybe_unpush_target (ops);
}
static void
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;
/* 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);
}