gdbserver/linux-low: turn 'cannot_{fetch/store}_register' into methods
[deliverable/binutils-gdb.git] / gdbserver / linux-tic6x-low.cc
index 47ca9883a80ba6d5a64a82da671c613a8164573c..be6eb98b45c4edba129f9ca10d3edf57ca0c5a0d 100644 (file)
@@ -44,9 +44,15 @@ class tic6x_target : public linux_process_target
 {
 public:
 
+  const regs_info *get_regs_info () override;
+
 protected:
 
   void low_arch_setup () override;
+
+  bool low_cannot_fetch_register (int regno) override;
+
+  bool low_cannot_store_register (int regno) override;
 };
 
 /* The singleton target ops object.  */
@@ -221,14 +227,14 @@ tic6x_read_description (enum c6x_feature feature)
   return *tdesc;
 }
 
-static int
-tic6x_cannot_fetch_register (int regno)
+bool
+tic6x_target::low_cannot_fetch_register (int regno)
 {
   return (tic6x_regmap[regno] == -1);
 }
 
-static int
-tic6x_cannot_store_register (int regno)
+bool
+tic6x_target::low_cannot_store_register (int regno)
 {
   return (tic6x_regmap[regno] == -1);
 }
@@ -387,23 +393,20 @@ static struct regsets_info tic6x_regsets_info =
     NULL, /* disabled_regsets */
   };
 
-static struct regs_info regs_info =
+static struct regs_info myregs_info =
   {
     NULL, /* regset_bitmap */
     &tic6x_usrregs_info,
     &tic6x_regsets_info
   };
 
-static const struct regs_info *
-tic6x_regs_info (void)
+const regs_info *
+tic6x_target::get_regs_info ()
 {
-  return &regs_info;
+  return &myregs_info;
 }
 
 struct linux_target_ops the_low_target = {
-  tic6x_regs_info,
-  tic6x_cannot_fetch_register,
-  tic6x_cannot_store_register,
   NULL, /* fetch_register */
   tic6x_get_pc,
   tic6x_set_pc,
This page took 0.028262 seconds and 4 git commands to generate.