gdbserver/linux-low: turn 'emit_ops' into a method
[deliverable/binutils-gdb.git] / gdbserver / linux-ppc-low.cc
index 5935c42a7764f9e8200edb19ee995cbda81a4c01..58f6629917cf9ccc5bf170af7aaf34de42adcbe7 100644 (file)
@@ -65,6 +65,20 @@ public:
 
   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;
+
 protected:
 
   void low_arch_setup () override;
@@ -1570,22 +1584,29 @@ ppc_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc)
   *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;
@@ -1779,8 +1800,8 @@ ppc_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr,
 
 /* 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;
 }
@@ -3360,10 +3381,10 @@ static struct emit_ops ppc64v2_emit_ops_impl =
 
 #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);
@@ -3433,9 +3454,6 @@ ppc_get_ipa_tdesc_idx (void)
 }
 
 struct linux_target_ops the_low_target = {
-  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 */
This page took 0.024934 seconds and 4 git commands to generate.