std::vector<CORE_ADDR> low_get_next_pcs (regcache *regcache) override;
bool low_breakpoint_at (CORE_ADDR pc) override;
+
+ int low_insert_point (raw_bkpt_type type, CORE_ADDR addr,
+ int size, raw_breakpoint *bp) override;
+
+ int low_remove_point (raw_bkpt_type type, CORE_ADDR addr,
+ int size, raw_breakpoint *bp) override;
+
+ bool low_stopped_by_watchpoint () override;
+
+ CORE_ADDR low_stopped_data_address () override;
+
+ arch_process_info *low_new_process () override;
+
+ void low_delete_process (arch_process_info *info) override;
+
+ void low_new_thread (lwp_info *) override;
+
+ void low_delete_thread (arch_lwp_info *) override;
+
+ void low_new_fork (process_info *parent, process_info *child) override;
+
+ void low_prepare_to_resume (lwp_info *lwp) override;
};
/* The singleton target ops object. */
}
/* Insert hardware break-/watchpoint. */
-static int
-arm_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
- int len, struct raw_breakpoint *bp)
+int
+arm_target::low_insert_point (raw_bkpt_type type, CORE_ADDR addr,
+ int len, raw_breakpoint *bp)
{
struct process_info *proc = current_process ();
struct arm_linux_hw_breakpoint p, *pts;
}
/* Remove hardware break-/watchpoint. */
-static int
-arm_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
- int len, struct raw_breakpoint *bp)
+int
+arm_target::low_remove_point (raw_bkpt_type type, CORE_ADDR addr,
+ int len, raw_breakpoint *bp)
{
struct process_info *proc = current_process ();
struct arm_linux_hw_breakpoint p, *pts;
}
/* Return whether current thread is stopped due to a watchpoint. */
-static int
-arm_stopped_by_watchpoint (void)
+bool
+arm_target::low_stopped_by_watchpoint ()
{
struct lwp_info *lwp = get_thread_lwp (current_thread);
siginfo_t siginfo;
/* We must be able to set hardware watchpoints. */
if (arm_linux_get_hw_watchpoint_count () == 0)
- return 0;
+ return false;
/* Retrieve siginfo. */
errno = 0;
ptrace (PTRACE_GETSIGINFO, lwpid_of (current_thread), 0, &siginfo);
if (errno != 0)
- return 0;
+ return false;
/* This must be a hardware breakpoint. */
if (siginfo.si_signo != SIGTRAP
|| (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
- return 0;
+ return false;
/* If we are in a positive slot then we're looking at a breakpoint and not
a watchpoint. */
if (siginfo.si_errno >= 0)
- return 0;
+ return false;
/* Cache stopped data address for use by arm_stopped_data_address. */
lwp->arch_private->stopped_data_address
= (CORE_ADDR) (uintptr_t) siginfo.si_addr;
- return 1;
+ return true;
}
/* Return data address that triggered watchpoint. Called only if
- arm_stopped_by_watchpoint returned true. */
-static CORE_ADDR
-arm_stopped_data_address (void)
+ low_stopped_by_watchpoint returned true. */
+CORE_ADDR
+arm_target::low_stopped_data_address ()
{
struct lwp_info *lwp = get_thread_lwp (current_thread);
return lwp->arch_private->stopped_data_address;
}
/* Called when a new process is created. */
-static struct arch_process_info *
-arm_new_process (void)
+arch_process_info *
+arm_target::low_new_process ()
{
struct arch_process_info *info = XCNEW (struct arch_process_info);
return info;
/* Called when a process is being deleted. */
-static void
-arm_delete_process (struct arch_process_info *info)
+void
+arm_target::low_delete_process (arch_process_info *info)
{
xfree (info);
}
/* Called when a new thread is detected. */
-static void
-arm_new_thread (struct lwp_info *lwp)
+void
+arm_target::low_new_thread (lwp_info *lwp)
{
struct arch_lwp_info *info = XCNEW (struct arch_lwp_info);
int i;
/* Function to call when a thread is being deleted. */
-static void
-arm_delete_thread (struct arch_lwp_info *arch_lwp)
+void
+arm_target::low_delete_thread (arch_lwp_info *arch_lwp)
{
xfree (arch_lwp);
}
-static void
-arm_new_fork (struct process_info *parent, struct process_info *child)
+void
+arm_target::low_new_fork (process_info *parent, process_info *child)
{
struct arch_process_info *parent_proc_info;
struct arch_process_info *child_proc_info;
/* Called when resuming a thread.
If the debug regs have changed, update the thread's copies. */
-static void
-arm_prepare_to_resume (struct lwp_info *lwp)
+void
+arm_target::low_prepare_to_resume (lwp_info *lwp)
{
struct thread_info *thread = get_lwp_thread (lwp);
int pid = lwpid_of (thread);
}
struct linux_target_ops the_low_target = {
- arm_insert_point,
- arm_remove_point,
- arm_stopped_by_watchpoint,
- arm_stopped_data_address,
- NULL, /* collect_ptrace_register */
- NULL, /* supply_ptrace_register */
- NULL, /* siginfo_fixup */
- arm_new_process,
- arm_delete_process,
- arm_new_thread,
- arm_delete_thread,
- arm_new_fork,
- arm_prepare_to_resume,
- NULL, /* process_qsupported */
NULL, /* supports_tracepoints */
NULL, /* get_thread_area */
NULL, /* install_fast_tracepoint_jump_pad */