bool supports_tracepoints () override;
+ bool supports_fast_tracepoints () override;
+
+ int install_fast_tracepoint_jump_pad
+ (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector,
+ CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry,
+ CORE_ADDR *trampoline, ULONGEST *trampoline_size,
+ unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size,
+ CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end,
+ char *err) override;
+
+ int get_min_fast_tracepoint_insn_len () override;
+
+ struct emit_ops *emit_ops () override;
+
+ int get_ipa_tdesc_idx () override;
+
protected:
void low_arch_setup () override;
int low_remove_point (raw_bkpt_type type, CORE_ADDR addr,
int size, raw_breakpoint *bp) override;
+
+ int low_get_thread_area (int lwpid, CORE_ADDR *addrp) override;
};
/* The singleton target ops object. */
supply_register_by_name (regcache, "spefscr", ®set->spefscr);
}
-/* Support for hardware single step. */
-
-static int
-ppc_supports_hardware_single_step (void)
-{
- return 1;
-}
-
static struct regset_info ppc_regsets[] = {
/* List the extra register sets before GENERAL_REGS. That way we will
fetch them every time, but still fall back to PTRACE_PEEKUSER for the
don't read anything from the address, and treat it as opaque; it's
the address itself that we assume is unique per-thread. */
-static int
-ppc_get_thread_area (int lwpid, CORE_ADDR *addr)
+int
+ppc_target::low_get_thread_area (int lwpid, CORE_ADDR *addr)
{
struct lwp_info *lwp = find_lwp_pid (ptid_t (lwpid));
struct thread_info *thr = get_lwp_thread (lwp);
*to += 4;
}
+bool
+ppc_target::supports_fast_tracepoints ()
+{
+ return true;
+}
+
/* Implement install_fast_tracepoint_jump_pad of target_ops.
See target.h for details. */
-static int
-ppc_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr,
- CORE_ADDR collector,
- CORE_ADDR lockaddr,
- ULONGEST orig_size,
- CORE_ADDR *jump_entry,
- CORE_ADDR *trampoline,
- ULONGEST *trampoline_size,
- unsigned char *jjump_pad_insn,
- ULONGEST *jjump_pad_insn_size,
- CORE_ADDR *adjusted_insn_addr,
- CORE_ADDR *adjusted_insn_addr_end,
- char *err)
+int
+ppc_target::install_fast_tracepoint_jump_pad (CORE_ADDR tpoint,
+ CORE_ADDR tpaddr,
+ CORE_ADDR collector,
+ CORE_ADDR lockaddr,
+ ULONGEST orig_size,
+ CORE_ADDR *jump_entry,
+ CORE_ADDR *trampoline,
+ ULONGEST *trampoline_size,
+ unsigned char *jjump_pad_insn,
+ ULONGEST *jjump_pad_insn_size,
+ CORE_ADDR *adjusted_insn_addr,
+ CORE_ADDR *adjusted_insn_addr_end,
+ char *err)
{
uint32_t buf[256];
uint32_t *p = buf;
/* Returns the minimum instruction length for installing a tracepoint. */
-static int
-ppc_get_min_fast_tracepoint_insn_len (void)
+int
+ppc_target::get_min_fast_tracepoint_insn_len ()
{
return 4;
}
#endif
-/* Implementation of linux_target_ops method "emit_ops". */
+/* Implementation of target ops method "emit_ops". */
-static struct emit_ops *
-ppc_emit_ops (void)
+emit_ops *
+ppc_target::emit_ops ()
{
#ifdef __powerpc64__
struct regcache *regcache = get_thread_regcache (current_thread, 0);
return &ppc_emit_ops_impl;
}
-/* Implementation of linux_target_ops method "get_ipa_tdesc_idx". */
+/* Implementation of target ops method "get_ipa_tdesc_idx". */
-static int
-ppc_get_ipa_tdesc_idx (void)
+int
+ppc_target::get_ipa_tdesc_idx ()
{
struct regcache *regcache = get_thread_regcache (current_thread, 0);
const struct target_desc *tdesc = regcache->tdesc;
return 0;
}
-struct linux_target_ops the_low_target = {
- ppc_get_thread_area,
- ppc_install_fast_tracepoint_jump_pad,
- ppc_emit_ops,
- ppc_get_min_fast_tracepoint_insn_len,
- NULL, /* supports_range_stepping */
- ppc_supports_hardware_single_step,
- NULL, /* get_syscall_trapinfo */
- ppc_get_ipa_tdesc_idx,
-};
-
/* The linux target ops object. */
linux_process_target *the_linux_target = &the_ppc_target;