gdbserver/linux-low: start turning linux target ops into methods
[deliverable/binutils-gdb.git] / gdbserver / linux-nios2-low.cc
index bfc5aee165d284e0202e3f6c52bd1873f7b05413..09f8778f293dea693641d1dc776ddaeb32f35094 100644 (file)
 #define PTRACE_GET_THREAD_AREA 25
 #endif
 
+/* Linux target op definitions for the NIOS II architecture.  */
+
+class nios2_target : public linux_process_target
+{
+public:
+
+};
+
+/* 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
@@ -131,12 +143,12 @@ nios2_breakpoint_at (CORE_ADDR where)
 
   /* For R2, first check for the 2-byte CDX trap.n breakpoint encoding.  */
 #if defined(__nios2_arch__) && __nios2_arch__ == 2
-  (*the_target->read_memory) (where, (unsigned char *) &insn, 2);
+  the_target->read_memory (where, (unsigned char *) &insn, 2);
   if (insn == CDX_BREAKPOINT)
     return 1;
 #endif
 
-  (*the_target->read_memory) (where, (unsigned char *) &insn, 4);
+  the_target->read_memory (where, (unsigned char *) &insn, 4);
   if (insn == nios2_breakpoint)
     return 1;
   return 0;
@@ -250,6 +262,10 @@ struct linux_target_ops the_low_target =
   nios2_breakpoint_at,
 };
 
+/* The linux target ops object.  */
+
+linux_process_target *the_linux_target = &the_nios2_target;
+
 void
 initialize_low_arch (void)
 {
This page took 0.024064 seconds and 4 git commands to generate.