/* Native-dependent code for BSD Unix running on ARM's, for GDB.
- Copyright (C) 1988-2017 Free Software Foundation, Inc.
+ Copyright (C) 1988-2018 Free Software Foundation, Inc.
This file is part of GDB.
#include "arm-tdep.h"
#include "inf-ptrace.h"
+class arm_netbsd_nat_target final : public inf_ptrace_target
+{
+public:
+ /* Add our register access methods. */
+ void fetch_registers (struct regcache *, int) override;
+ void store_registers (struct regcache *, int) override;
+};
+
+static arm_netbsd_nat_target the_arm_netbsd_nat_target;
+
extern int arm_apcs_32;
static void
arm_supply_fparegset (regcache, &inferior_fp_registers);
}
-static void
-armnbsd_fetch_registers (struct target_ops *ops,
- struct regcache *regcache, int regno)
+void
+arm_nbsd_nat_target::fetch_registers (struct regcache *regcache, int regno)
{
if (regno >= 0)
{
warning (_("unable to store floating-point registers"));
}
-static void
-armnbsd_store_registers (struct target_ops *ops,
- struct regcache *regcache, int regno)
+void
+arm_nbsd_nat_target::store_registers (struct regcache *regcache, int regno)
{
if (regno >= 0)
{
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);
+ add_inf_child_target (&the_arm_netbsd_nat_target);
deprecated_add_core_fns (&arm_netbsd_elfcore_fns);
}