diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-10-12 22:18:55 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-10-12 22:18:55 +0000 |
commit | 1b9445c221ae5af50d982e82d241d11a4ac36764 (patch) | |
tree | d97ec0a303d4b007268519b5d3a56015b342cf5d /gdb | |
parent | d52fe014d1263631d8b6691ad87e9b8e44468265 (diff) | |
download | binutils-1b9445c221ae5af50d982e82d241d11a4ac36764.zip binutils-1b9445c221ae5af50d982e82d241d11a4ac36764.tar.gz binutils-1b9445c221ae5af50d982e82d241d11a4ac36764.tar.bz2 |
* 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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 23 | ||||
-rw-r--r-- | gdb/Makefile.in | 6 | ||||
-rw-r--r-- | gdb/config/sparc/fbsd.mh | 2 | ||||
-rw-r--r-- | gdb/config/sparc/linux.mh | 2 | ||||
-rw-r--r-- | gdb/config/sparc/linux64.mh | 2 | ||||
-rw-r--r-- | gdb/config/sparc/nbsd64.mh | 4 | ||||
-rw-r--r-- | gdb/config/sparc/nbsdaout.mh | 8 | ||||
-rw-r--r-- | gdb/config/sparc/nbsdelf.mh | 4 | ||||
-rw-r--r-- | gdb/sparc-nat.c | 15 | ||||
-rw-r--r-- | gdb/sparc-nat.h | 7 | ||||
-rw-r--r-- | gdb/sparc64nbsd-nat.c | 4 | ||||
-rw-r--r-- | gdb/sparcnbsd-nat.c | 5 |
12 files changed, 67 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 56246f2..a4a8fd3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,28 @@ 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. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 51fa3ce..fb30732 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2533,7 +2533,7 @@ sparc64-linux-tdep.o: sparc64-linux-tdep.c $(defs_h) $(gdbarch_h) $(osabi_h) \ $(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) \ @@ -2556,8 +2556,8 @@ sparc-linux-tdep.o: sparc-linux-tdep.c $(defs_h) $(floatformat_h) $(frame_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) \ diff --git a/gdb/config/sparc/fbsd.mh b/gdb/config/sparc/fbsd.mh index fb491a5..ec9a31a 100644 --- a/gdb/config/sparc/fbsd.mh +++ b/gdb/config/sparc/fbsd.mh @@ -1,5 +1,5 @@ # 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 diff --git a/gdb/config/sparc/linux.mh b/gdb/config/sparc/linux.mh index 67ed965..abd3ed8 100644 --- a/gdb/config/sparc/linux.mh +++ b/gdb/config/sparc/linux.mh @@ -1,7 +1,7 @@ # 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 diff --git a/gdb/config/sparc/linux64.mh b/gdb/config/sparc/linux64.mh index 5f6aed5..05a63b0 100644 --- a/gdb/config/sparc/linux64.mh +++ b/gdb/config/sparc/linux64.mh @@ -2,7 +2,7 @@ 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 diff --git a/gdb/config/sparc/nbsd64.mh b/gdb/config/sparc/nbsd64.mh index 9ac8cf4..95d4166 100644 --- a/gdb/config/sparc/nbsd64.mh +++ b/gdb/config/sparc/nbsd64.mh @@ -1,6 +1,6 @@ # 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 diff --git a/gdb/config/sparc/nbsdaout.mh b/gdb/config/sparc/nbsdaout.mh index 8944e60..cd0067d 100644 --- a/gdb/config/sparc/nbsdaout.mh +++ b/gdb/config/sparc/nbsdaout.mh @@ -1,4 +1,6 @@ # 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 diff --git a/gdb/config/sparc/nbsdelf.mh b/gdb/config/sparc/nbsdelf.mh index 611a6a4..d258fcc 100644 --- a/gdb/config/sparc/nbsdelf.mh +++ b/gdb/config/sparc/nbsdelf.mh @@ -1,6 +1,6 @@ # 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 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. */ diff --git a/gdb/sparc-nat.h b/gdb/sparc-nat.h index 8f99b1e..25ecc63 100644 --- a/gdb/sparc-nat.h +++ b/gdb/sparc-nat.h @@ -1,6 +1,6 @@ /* Native-dependent code for SPARC. - Copyright 2003 Free Software Foundation, Inc. + Copyright 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -37,4 +37,9 @@ extern int (*sparc_fpregset_supplies_p) (int); 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 */ diff --git a/gdb/sparc64nbsd-nat.c b/gdb/sparc64nbsd-nat.c index 7d554cf..fe9e006 100644 --- a/gdb/sparc64nbsd-nat.c +++ b/gdb/sparc64nbsd-nat.c @@ -21,6 +21,7 @@ #include "defs.h" #include "regcache.h" +#include "target.h" #include "sparc64-tdep.h" #include "sparc-nat.h" @@ -169,6 +170,9 @@ _initialize_sparc64nbsd_nat (void) 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); } diff --git a/gdb/sparcnbsd-nat.c b/gdb/sparcnbsd-nat.c index fa663f2..4b0eb12 100644 --- a/gdb/sparcnbsd-nat.c +++ b/gdb/sparcnbsd-nat.c @@ -20,8 +20,8 @@ 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" @@ -66,6 +66,9 @@ _initialize_sparcnbsd_nat (void) { 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); } |