(sparc_target): New function.
* sparc-nat.h: Update copyright year.
(sparc_target): New prototype.
* sparcnbsd-nat.c: Don't include "gdbcore.h", include "target.h".
(_initialize_sparcnbsd_nat): Construct and add target vector.
* sparc64nbsd-nat.c: Include "target.h".
(_initialize_sparc64nbsd_nat): Construct and add target vector.
* Makefile.in (sparc-nat.o, sparcnbsd-nat.o, sparc64nbsd-nat.o):
Update dependencies.
* config/sparc/nbsd64.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o, add inf-ptrace.o.
* config/sparc/nbsdaout.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o, add inf-ptrace.o and bsd-kvm.o.
(NAT_FILE): Set to nm-bsd.h.
(LOADLIBES): New variable.
* config/sparc/nbsdelf.mh (NATDEPFILES): Remove infptrace.o and
infarg.o, add inf-ptrace.o.
* config/sparc/nm-nbsdaout.h: Remove file.
* config/sparc/fbsd.mh (NATDEPFILES): Add inf-ptrace.o.
* config/sparc/linux.mh (NATDEPFILES): Add inf-ptrace.o.
* config/sparc/linux64.mh (NATDEPFILES): Add inf-ptrace.o.
2004-10-12 Mark Kettenis <kettenis@gnu.org>
+ * sparc-nat.c: Include "inf-ptrace.h".
+ (sparc_target): New function.
+ * sparc-nat.h: Update copyright year.
+ (sparc_target): New prototype.
+ * sparcnbsd-nat.c: Don't include "gdbcore.h", include "target.h".
+ (_initialize_sparcnbsd_nat): Construct and add target vector.
+ * sparc64nbsd-nat.c: Include "target.h".
+ (_initialize_sparc64nbsd_nat): Construct and add target vector.
+ * Makefile.in (sparc-nat.o, sparcnbsd-nat.o, sparc64nbsd-nat.o):
+ Update dependencies.
+ * config/sparc/nbsd64.mh (NATDEPFILES): Remove infptrace.o and
+ inftarg.o, add inf-ptrace.o.
+ * config/sparc/nbsdaout.mh (NATDEPFILES): Remove infptrace.o and
+ inftarg.o, add inf-ptrace.o and bsd-kvm.o.
+ (NAT_FILE): Set to nm-bsd.h.
+ (LOADLIBES): New variable.
+ * config/sparc/nbsdelf.mh (NATDEPFILES): Remove infptrace.o and
+ infarg.o, add inf-ptrace.o.
+ * config/sparc/nm-nbsdaout.h: Remove file.
+ * config/sparc/fbsd.mh (NATDEPFILES): Add inf-ptrace.o.
+ * config/sparc/linux.mh (NATDEPFILES): Add inf-ptrace.o.
+ * config/sparc/linux64.mh (NATDEPFILES): Add inf-ptrace.o.
+
* defs.h [!FOPEN_RB]: Include "fopen-bin.h" instead of
"fopen-same.h". Update comment.
$(sparc64_tdep_h)
sparc64-nat.o: sparc64-nat.c $(defs_h) $(gdbarch_h) $(sparc64_tdep_h) \
$(sparc_nat_h)
-sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(regcache_h) \
+sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(regcache_h) $(target_h) \
$(sparc64_tdep_h) $(sparc_nat_h) $(bsd_kvm_h)
sparc64nbsd-tdep.o: sparc64nbsd-tdep.c $(defs_h) $(frame_h) \
$(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \
$(gdb_string_h) $(sparc_tdep_h)
sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(regcache_h) $(target_h) \
$(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) $(sparc_tdep_h) \
- $(sparc_nat_h)
-sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
+ $(sparc_nat_h) $(inf_ptrace_h)
+sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(regcache_h) $(target_h) \
$(sparc_tdep_h) $(sparc_nat_h) $(bsd_kvm_h)
sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \
$(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \
# Host: FreeBSD/sparc64
NATDEPFILES= sparc64fbsd-nat.o sparc64-nat.o sparc-nat.o \
- fork-child.o infptrace.o inftarg.o \
+ fork-child.o inf-ptrace.o infptrace.o inftarg.o \
solib.o solib-svr4.o solib-legacy.o
NAT_FILE= nm-fbsd.h
# Host: GNU/Linux SPARC
NAT_FILE= nm-linux.h
NATDEPFILES= sparc-nat.o sparc-sol2-nat.o \
- corelow.o core-regset.o fork-child.o \
+ corelow.o core-regset.o fork-child.o inf-ptrace.o \
infptrace.o inftarg.o \
proc-service.o thread-db.o \
gcore.o linux-nat.o
NAT_FILE= nm-linux.h
NATDEPFILES= sparc-nat.o sparc64-nat.o sparc-sol2-nat.o sparc64-linux-nat.o \
corelow.o core-regset.o \
- fork-child.o infptrace.o inftarg.o \
+ fork-child.o inf-ptrace.o infptrace.o inftarg.o \
proc-service.o thread-db.o \
gcore.o linux-nat.o
# Host: NetBSD/sparc64
-NATDEPFILES= sparc64nbsd-nat.o sparc-nat.o bsd-kvm.o \
- fork-child.o infptrace.o inftarg.o
+NATDEPFILES= fork-child.o inf-ptrace.o \
+ sparc64nbsd-nat.o sparc-nat.o bsd-kvm.o
NAT_FILE= nm-nbsd.h
LOADLIBES= -lkvm
# Host: NetBSD/sparc a.out
-NATDEPFILES= sparc-nat.o sparcnbsd-nat.o \
- fork-child.o infptrace.o inftarg.o solib-sunos.o
-NAT_FILE= nm-nbsdaout.h
+NATDEPFILES= fork-child.o inf-ptrace.o \
+ sparc-nat.o sparcnbsd-nat.o bsd-kvm.o solib-sunos.o
+NAT_FILE= nm-nbsd.h
+
+LOADLIBES= -lkvm
# Host: NetBSD/sparc ELF
-NATDEPFILES= sparc-nat.o sparcnbsd-nat.o bsd-kvm.o \
- fork-child.o infptrace.o inftarg.o
+NATDEPFILES= fork-child.o inf-ptrace.o \
+ sparc-nat.o sparcnbsd-nat.o bsd-kvm.o
NAT_FILE= nm-nbsd.h
LOADLIBES= -lkvm
#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,
memcpy (readbuf, buf + offset, len);
return len;
}
+\f
+/* 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;
+}
\f
/* Provide a prototype to silence -Wmissing-prototypes. */
/* Native-dependent code for SPARC.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
extern int sparc32_gregset_supplies_p (int regnum);
extern int sparc32_fpregset_supplies_p (int regnum);
+/* Create a prototype generic SPARC target. The client can override
+ it with local methods. */
+
+extern struct target_ops *sparc_target (void);
+
#endif /* sparc-nat.h */
#include "defs.h"
#include "regcache.h"
+#include "target.h"
#include "sparc64-tdep.h"
#include "sparc-nat.h"
sparc_gregset_supplies_p = sparc64nbsd_gregset_supplies_p;
sparc_fpregset_supplies_p = sparc64nbsd_fpregset_supplies_p;
+ /* We've got nothing to add to the generic SPARC target. */
+ add_target (sparc_target ());
+
/* Support debugging kernel virtual memory images. */
bsd_kvm_add_target (sparc64nbsd_supply_pcb);
}
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "gdbcore.h"
#include "regcache.h"
+#include "target.h"
#include "sparc-tdep.h"
#include "sparc-nat.h"
{
sparc_gregset = &sparc32nbsd_gregset;
+ /* We've got nothing to add to the generic SPARC target. */
+ add_target (sparc_target ());
+
/* Support debugging kernel virtual memory images. */
bsd_kvm_add_target (sparc32nbsd_supply_pcb);
}