gdbserver/linux-low: turn 'regs_info' into a method
[deliverable/binutils-gdb.git] / gdbserver / linux-nios2-low.cc
index 09f8778f293dea693641d1dc776ddaeb32f35094..2e19b8dc7de7041b27c3fecb1ccd4ca78fc79b1e 100644 (file)
@@ -37,6 +37,11 @@ class nios2_target : public linux_process_target
 {
 public:
 
+  const regs_info *get_regs_info () override;
+
+protected:
+
+  void low_arch_setup () override;
 };
 
 /* The singleton target ops object.  */
@@ -77,10 +82,10 @@ static int nios2_regmap[] = {
   0
 };
 
-/* Implement the arch_setup linux_target_ops method.  */
+/* Implement the low_arch_setup linux target ops method.  */
 
-static void
-nios2_arch_setup (void)
+void
+nios2_target::low_arch_setup ()
 {
   current_process ()->tdesc = tdesc_nios2_linux;
 }
@@ -233,23 +238,21 @@ static struct usrregs_info nios2_usrregs_info =
     nios2_regmap,
   };
 
-static struct regs_info regs_info =
+static struct regs_info myregs_info =
   {
     NULL, /* regset_bitmap */
     &nios2_usrregs_info,
     &nios2_regsets_info
   };
 
-static const struct regs_info *
-nios2_regs_info (void)
+const regs_info *
+nios2_target::get_regs_info ()
 {
-  return &regs_info;
+  return &myregs_info;
 }
 
 struct linux_target_ops the_low_target =
 {
-  nios2_arch_setup,
-  nios2_regs_info,
   nios2_cannot_fetch_register,
   nios2_cannot_store_register,
   NULL,
This page took 0.024789 seconds and 4 git commands to generate.