gdbserver/linux-low: turn 'arch_setup' into a method
[deliverable/binutils-gdb.git] / gdbserver / linux-xtensa-low.cc
index 510c9bd8879f782264621338391f2cbd880cd029..a7ed08541f5f45948f0293a1faecc0f8ac7044fe 100644 (file)
 #include "server.h"
 #include "linux-low.h"
 
+/* Linux target op definitions for the Xtensa architecture.  */
+
+class xtensa_target : public linux_process_target
+{
+public:
+
+protected:
+
+  void low_arch_setup () override;
+};
+
+/* The singleton target ops object.  */
+
+static xtensa_target the_xtensa_target;
+
 /* Defined in auto-generated file reg-xtensa.c.  */
 void init_registers_xtensa (void);
 extern const struct target_desc *tdesc_xtensa;
@@ -246,8 +261,8 @@ static struct regs_info regs_info =
     &xtensa_regsets_info
   };
 
-static void
-xtensa_arch_setup (void)
+void
+xtensa_target::low_arch_setup ()
 {
   current_process ()->tdesc = tdesc_xtensa;
 }
@@ -267,7 +282,6 @@ xtensa_regs_info (void)
 }
 
 struct linux_target_ops the_low_target = {
-  xtensa_arch_setup,
   xtensa_regs_info,
   0,
   0,
@@ -304,6 +318,9 @@ struct linux_target_ops the_low_target = {
   xtensa_supports_hardware_single_step,
 };
 
+/* The linux target ops object.  */
+
+linux_process_target *the_linux_target = &the_xtensa_target;
 
 void
 initialize_low_arch (void)
This page took 0.024815 seconds and 4 git commands to generate.