gdbserver/linux-low: turn 'siginfo_fixup' into a method
[deliverable/binutils-gdb.git] / gdbserver / linux-mips-low.cc
index 5696af6fae26aa71ec34eebfe9857216fb7aeb2a..b7098a72c6c5129334a9ff2d40f6d1d73d612928 100644 (file)
@@ -60,6 +60,16 @@ protected:
 
   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;
+
+  void low_collect_ptrace_register (regcache *regcache, int regno,
+                                   char *buf) override;
+
+  void low_supply_ptrace_register (regcache *regcache, int regno,
+                                  const char *buf) override;
 };
 
 /* The singleton target ops object.  */
@@ -608,12 +618,12 @@ mips_target::low_remove_point (raw_bkpt_type type, CORE_ADDR addr,
   return 0;
 }
 
-/* This is the implementation of linux_target_ops method
-   stopped_by_watchpoint.  The watchhi R and W bits indicate
+/* This is the implementation of linux target ops method
+   low_stopped_by_watchpoint.  The watchhi R and W bits indicate
    the watch register triggered. */
 
-static int
-mips_stopped_by_watchpoint (void)
+bool
+mips_target::low_stopped_by_watchpoint ()
 {
   struct process_info *proc = current_process ();
   struct arch_process_info *priv = proc->priv->arch_private;
@@ -632,16 +642,16 @@ mips_stopped_by_watchpoint (void)
   for (n = 0; n < MAX_DEBUG_REGISTER && n < num_valid; n++)
     if (mips_linux_watch_get_watchhi (&priv->watch_readback, n)
        & (R_MASK | W_MASK))
-      return 1;
+      return true;
 
-  return 0;
+  return false;
 }
 
-/* This is the implementation of linux_target_ops method
-   stopped_data_address.  */
+/* This is the implementation of linux target ops method
+   low_stopped_data_address.  */
 
-static CORE_ADDR
-mips_stopped_data_address (void)
+CORE_ADDR
+mips_target::low_stopped_data_address ()
 {
   struct process_info *proc = current_process ();
   struct arch_process_info *priv = proc->priv->arch_private;
@@ -887,9 +897,9 @@ mips_store_fpregset (struct regcache *regcache, const void *buf)
 
 /* Take care of 32-bit registers with 64-bit ptrace, POKEUSER side.  */
 
-static void
-mips_collect_ptrace_register (struct regcache *regcache,
-                             int regno, char *buf)
+void
+mips_target::low_collect_ptrace_register (regcache *regcache, int regno,
+                                         char *buf)
 {
   int use_64bit = sizeof (PTRACE_XFER_TYPE) == 8;
 
@@ -906,9 +916,9 @@ mips_collect_ptrace_register (struct regcache *regcache,
 
 /* Take care of 32-bit registers with 64-bit ptrace, PEEKUSER side.  */
 
-static void
-mips_supply_ptrace_register (struct regcache *regcache,
-                            int regno, const char *buf)
+void
+mips_target::low_supply_ptrace_register (regcache *regcache, int regno,
+                                        const char *buf)
 {
   int use_64bit = sizeof (PTRACE_XFER_TYPE) == 8;
 
@@ -976,11 +986,6 @@ mips_target::get_regs_info ()
 }
 
 struct linux_target_ops the_low_target = {
-  mips_stopped_by_watchpoint,
-  mips_stopped_data_address,
-  mips_collect_ptrace_register,
-  mips_supply_ptrace_register,
-  NULL, /* siginfo_fixup */
   mips_linux_new_process,
   mips_linux_delete_process,
   mips_linux_new_thread,
This page took 0.026663 seconds and 4 git commands to generate.