aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/sparc-nat.c')
-rw-r--r--gdb/sparc-nat.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index 858e278..a3836ce 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -35,6 +35,7 @@
#include "sparc-tdep.h"
#include "sparc-nat.h"
+#include "inf-ptrace.h"
/* With some trickery we can use the code in this file for most (if
not all) ptrace(2) based SPARC systems, which includes SunOS 4,
@@ -304,6 +305,20 @@ sparc_xfer_wcookie (struct target_ops *ops, enum target_object object,
memcpy (readbuf, buf + offset, len);
return len;
}
+
+/* Create a prototype generic SPARC target. The client can override
+ it with local methods. */
+
+struct target_ops *
+sparc_target (void)
+{
+ struct target_ops *t;
+
+ t = inf_ptrace_target ();
+ t->to_fetch_registers = fetch_inferior_registers;
+ t->to_store_registers = store_inferior_registers;
+ return t;
+}
/* Provide a prototype to silence -Wmissing-prototypes. */