aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-linux-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/arm-linux-nat.c')
-rw-r--r--gdb/arm-linux-nat.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index 8059af6..84aaaf6 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -1,5 +1,6 @@
/* GNU/Linux on ARM native support.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -23,6 +24,8 @@
#include "gdbcore.h"
#include "gdb_string.h"
#include "regcache.h"
+#include "target.h"
+#include "linux-nat.h"
#include "arm-tdep.h"
@@ -547,8 +550,8 @@ store_regs (void)
regno == -1, otherwise fetch all general registers or all floating
point registers depending upon the value of regno. */
-void
-fetch_inferior_registers (int regno)
+static void
+arm_linux_fetch_inferior_registers (int regno)
{
if (-1 == regno)
{
@@ -569,8 +572,8 @@ fetch_inferior_registers (int regno)
regno == -1, otherwise store all general registers or all floating
point registers depending upon the value of regno. */
-void
-store_inferior_registers (int regno)
+static void
+arm_linux_store_inferior_registers (int regno)
{
if (-1 == regno)
{
@@ -716,8 +719,22 @@ get_linux_version (unsigned int *vmajor,
return ((*vmajor << 16) | (*vminor << 8) | *vrelease);
}
+void _initialize_arm_linux_nat (void);
+
void
_initialize_arm_linux_nat (void)
{
+ struct target_ops *t;
+
os_version = get_linux_version (&os_major, &os_minor, &os_release);
+
+ /* Fill in the generic GNU/Linux methods. */
+ t = linux_target ();
+
+ /* Add our register access methods. */
+ t->to_fetch_registers = arm_linux_fetch_inferior_registers;
+ t->to_store_registers = arm_linux_store_inferior_registers;
+
+ /* Register the target. */
+ add_target (t);
}