#define PTRACE_GET_THREAD_AREA 25
#endif
+/* Linux target op definitions for the NIOS II architecture. */
+
+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. */
+
+static nios2_target the_nios2_target;
+
/* The following definition must agree with the number of registers
defined in "struct user_regs" in GLIBC
(sysdeps/unix/sysv/linux/nios2/sys/user.h), and also with
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;
}
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 ®s_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,
nios2_breakpoint_at,
};
+/* The linux target ops object. */
+
+linux_process_target *the_linux_target = &the_nios2_target;
+
void
initialize_low_arch (void)
{