gdbserver/linux-low: turn 'cannot_{fetch/store}_register' into methods
[deliverable/binutils-gdb.git] / gdbserver / linux-ia64-low.cc
index 2399e58b36671d6e4a7bdba53f8e38cfb0b2be6c..471530a621bffff4c215811148c4d4eccae53bff 100644 (file)
 #include <sys/reg.h>
 #endif
 
+/* Linux target op definitions for the IA64 architecture.  */
+
+class ia64_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.  */
+
+static ia64_target the_ia64_target;
+
 /* Defined in auto-generated file reg-ia64.c.  */
 void init_registers_ia64 (void);
 extern const struct target_desc *tdesc_ia64;
@@ -266,16 +287,16 @@ static int ia64_regmap[] =
     -1,
   };
 
-static int
-ia64_cannot_store_register (int regno)
+bool
+ia64_target::low_cannot_store_register (int regno)
 {
-  return 0;
+  return false;
 }
 
-static int
-ia64_cannot_fetch_register (int regno)
+bool
+ia64_target::low_cannot_fetch_register (int regno)
 {
-  return 0;
+  return false;
 }
 
 /* GDB register numbers.  */
@@ -326,33 +347,33 @@ static struct usrregs_info ia64_usrregs_info =
     ia64_regmap,
   };
 
-static struct regs_info regs_info =
+static struct regs_info myregs_info =
   {
     NULL, /* regset_bitmap */
     &ia64_usrregs_info
   };
 
-static const struct regs_info *
-ia64_regs_info (void)
+const regs_info *
+ia64_target::get_regs_info ()
 {
-  return &regs_info;
+  return &myregs_info;
 }
 
-static void
-ia64_arch_setup (void)
+void
+ia64_target::low_arch_setup ()
 {
   current_process ()->tdesc = tdesc_ia64;
 }
 
 
 struct linux_target_ops the_low_target = {
-  ia64_arch_setup,
-  ia64_regs_info,
-  ia64_cannot_fetch_register,
-  ia64_cannot_store_register,
   ia64_fetch_register,
 };
 
+/* The linux target ops object.  */
+
+linux_process_target *the_linux_target = &the_ia64_target;
+
 void
 initialize_low_arch (void)
 {
This page took 0.024241 seconds and 4 git commands to generate.