This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[COMMIT] Target vector inheritance for *BSD/arm
- From: Mark Kettenis <kettenis at gnu dot org>
- To: gdb-patches at sourceware dot org
- Date: Sun, 22 May 2005 14:36:52 -0600 (MDT)
- Subject: [COMMIT] Target vector inheritance for *BSD/arm
Committed as obvious.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* armnbsd-nat.c: Include "gdb_string.h" and "inf_ptrace.h".
Reorder includes. Don't require FETCH_INFERIOR_REGISTERS to be
defined.
(armnbsd_fetch_registers): Rename from armnbsd_fetch_registers.
Make static.
(armnbsd_store_registers): Rename from armnbsd_store_registers.
Make static.
(_initialize_arm_netbsd_nat): Construct and add target vector.
* Makefile.in (armnbsd-nat.o): Update dependencies.
* config/arm/nbsdaout.mh (NATDEPFILES): Remove infptrace.o and
intarg.o, add inf-ptrace.o.
(NAT_FILE): Set to solib.h.
* config/arm/nbsdelf.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o, add inf-ptrace.o.
(NAT_FILE): Remove.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.732
diff -u -p -r1.732 Makefile.in
--- Makefile.in 18 May 2005 08:52:17 -0000 1.732
+++ Makefile.in 22 May 2005 20:34:34 -0000
@@ -1739,8 +1739,8 @@ arm-linux-tdep.o: arm-linux-tdep.c $(def
$(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \
$(doublest_h) $(solib_svr4_h) $(osabi_h) $(arm_tdep_h) \
$(glibc_tdep_h)
-armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \
- $(regcache_h) $(gdbcore_h)
+armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
+ $(regcache_h) $(target_h) $(gdb_string_h) $(arm_tdep_h) $(inf_ptrace_h)
armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \
$(arm_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
Index: armnbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/armnbsd-nat.c,v
retrieving revision 1.13
diff -u -p -r1.13 armnbsd-nat.c
--- armnbsd-nat.c 5 Jan 2005 15:43:43 -0000 1.13
+++ armnbsd-nat.c 22 May 2005 20:34:35 -0000
@@ -21,20 +21,19 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "gdbcore.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "target.h"
-#ifndef FETCH_INFERIOR_REGISTERS
-#error Not FETCH_INFERIOR_REGISTERS
-#endif /* !FETCH_INFERIOR_REGISTERS */
-
-#include "arm-tdep.h"
-
+#include "gdb_string.h"
#include <sys/types.h>
#include <sys/ptrace.h>
#include <machine/reg.h>
#include <machine/frame.h>
-#include "inferior.h"
-#include "regcache.h"
-#include "gdbcore.h"
+
+#include "arm-tdep.h"
+#include "inf-ptrace.h"
extern int arm_apcs_32;
@@ -194,8 +193,8 @@ fetch_fp_regs (void)
supply_fparegset (&inferior_fp_registers);
}
-void
-fetch_inferior_registers (int regno)
+static void
+armnbsd_fetch_registers (int regno)
{
if (regno >= 0)
{
@@ -391,8 +390,8 @@ store_fp_regs (void)
warning (_("unable to store floating-point registers"));
}
-void
-store_inferior_registers (int regno)
+static void
+armnbsd_store_registers (int regno)
{
if (regno >= 0)
{
@@ -486,6 +485,13 @@ static struct core_fns arm_netbsd_elfcor
void
_initialize_arm_netbsd_nat (void)
{
+ struct target_ops *t;
+
+ t = inf_ptrace_target ();
+ t->to_fetch_registers = armnbsd_fetch_registers;
+ t->to_store_registers = armnbsd_store_registers;
+ add_target (t);
+
deprecated_add_core_fns (&arm_netbsd_core_fns);
deprecated_add_core_fns (&arm_netbsd_elfcore_fns);
}
Index: config/arm/nbsdaout.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/nbsdaout.mh,v
retrieving revision 1.2
diff -u -p -r1.2 nbsdaout.mh
--- config/arm/nbsdaout.mh 29 Jul 2004 21:24:55 -0000 1.2
+++ config/arm/nbsdaout.mh 22 May 2005 20:34:35 -0000
@@ -1,4 +1,4 @@
-# Host ARM running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o armnbsd-nat.o \
+# Host: NetBSD/arm
+NATDEPFILES= fork-child.o inf-ptrace.o corelow.o armnbsd-nat.o \
solib-sunos.o
-NAT_FILE=nm-nbsdaout.h
+NAT_FILE= solib.h
Index: config/arm/nbsdelf.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/nbsdelf.mh,v
retrieving revision 1.3
diff -u -p -r1.3 nbsdelf.mh
--- config/arm/nbsdelf.mh 3 Sep 2004 19:08:17 -0000 1.3
+++ config/arm/nbsdelf.mh 22 May 2005 20:34:35 -0000
@@ -1,3 +1,2 @@
-# Host ARM running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o armnbsd-nat.o
-NAT_FILE= config/nm-nbsd.h
+# Host: NetBSD/arm
+NATDEPFILES= fork-child.o inf-ptrace.o corelow.o armnbsd-nat.o