aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2005-05-22 20:36:19 +0000
committerMark Kettenis <kettenis@gnu.org>2005-05-22 20:36:19 +0000
commit2b73aeb128527461d3647f36fe1d5ee700fbd384 (patch)
tree6cee0fb770e1944e5e73b5d66548acd894dd88ef /gdb
parent5238cf52e73e106f9e11a30e2fc32e8ed0f4d288 (diff)
downloadgdb-2b73aeb128527461d3647f36fe1d5ee700fbd384.zip
gdb-2b73aeb128527461d3647f36fe1d5ee700fbd384.tar.gz
gdb-2b73aeb128527461d3647f36fe1d5ee700fbd384.tar.bz2
* 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog16
-rw-r--r--gdb/Makefile.in4
-rw-r--r--gdb/armnbsd-nat.c32
-rw-r--r--gdb/config/arm/nbsdaout.mh6
-rw-r--r--gdb/config/arm/nbsdelf.mh5
5 files changed, 42 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0d932db..7bfe7ca 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,21 @@
2005-05-22 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.
+
* arm-tdep.c (arm_extract_return_value, arm_store_return_value):
Change type of last argument to `gdb_byte *'.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c8ce2fe..eea8b14 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1739,8 +1739,8 @@ arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \
$(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) \
diff --git a/gdb/armnbsd-nat.c b/gdb/armnbsd-nat.c
index 1e5997b..947a177 100644
--- a/gdb/armnbsd-nat.c
+++ b/gdb/armnbsd-nat.c
@@ -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_elfcore_fns =
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);
}
diff --git a/gdb/config/arm/nbsdaout.mh b/gdb/config/arm/nbsdaout.mh
index 1d4f9b4..2e84c1b 100644
--- a/gdb/config/arm/nbsdaout.mh
+++ b/gdb/config/arm/nbsdaout.mh
@@ -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
diff --git a/gdb/config/arm/nbsdelf.mh b/gdb/config/arm/nbsdelf.mh
index b979f6a..8ff679f 100644
--- a/gdb/config/arm/nbsdelf.mh
+++ b/gdb/config/arm/nbsdelf.mh
@@ -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