* hppabsd-nat.c: Update copyright year. Include "target.h" and

"inf-ptrace.h".
(hppabsd_fetch_registers): Renamed from fetch_inferior_registers;
made static.
(hppabsd_store_registers): Renamed from store_inferior_registers;
made static.
(_initialize_hppabsd_nat): New function and prototype.
* config/pa/obsd.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o.  Add inf-ptrace.o.
(NAT_FILE): Remove.
* Makefile.in (hppabsd-nat.o): Update dependencies.
This commit is contained in:
Mark Kettenis 2005-04-17 22:20:20 +00:00
parent 64c1196b58
commit 57cd0b542e
4 changed files with 38 additions and 8 deletions

View file

@ -1,3 +1,17 @@
2005-04-18 Mark Kettenis <kettenis@gnu.org>
* hppabsd-nat.c: Update copyright year. Include "target.h" and
"inf-ptrace.h".
(hppabsd_fetch_registers): Renamed from fetch_inferior_registers;
made static.
(hppabsd_store_registers): Renamed from store_inferior_registers;
made static.
(_initialize_hppabsd_nat): New function and prototype.
* config/pa/obsd.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o. Add inf-ptrace.o.
(NAT_FILE): Remove.
* Makefile.in (hppabsd-nat.o): Update dependencies.
2005-04-17 Mark Kettenis <kettenis@gnu.org> 2005-04-17 Mark Kettenis <kettenis@gnu.org>
* pa64solib.c, pa64solib.h: Remove files. * pa64solib.c, pa64solib.h: Remove files.

View file

@ -1994,7 +1994,7 @@ go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \
hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \ hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
$(gdbtypes_h) $(gdbcore_h) $(cp_abi_h) $(gnu_v2_abi_h) $(gdbtypes_h) $(gdbcore_h) $(cp_abi_h) $(gnu_v2_abi_h)
hppabsd-nat.o: hppabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ hppabsd-nat.o: hppabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(hppa_tdep_h) $(target_h) $(hppa_tdep_h) $(inf_ptrace_h)
hppabsd-tdep.o: hppabsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \ hppabsd-tdep.o: hppabsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
$(regcache_h) $(regset_h) $(gdb_assert_h) $(gdb_string_h) \ $(regcache_h) $(regset_h) $(gdb_assert_h) $(gdb_string_h) \
$(hppa_tdep_h) $(solib_svr4_h) $(hppa_tdep_h) $(solib_svr4_h)

View file

@ -1,3 +1,2 @@
# Host: OpenBSD/hppa # Host: OpenBSD/hppa
NATDEPFILES= fork-child.o infptrace.o inftarg.o hppabsd-nat.o NATDEPFILES= fork-child.o inf-ptrace.o hppabsd-nat.o
NAT_FILE= config/nm-bsd.h

View file

@ -1,6 +1,6 @@
/* Native-dependent code for HP PA-RISC BSD's. /* Native-dependent code for HP PA-RISC BSD's.
Copyright 2004 Free Software Foundation, Inc. Copyright 2004, 2005 Free Software Foundation, Inc.
This file is part of GDB. This file is part of GDB.
@ -22,12 +22,14 @@
#include "defs.h" #include "defs.h"
#include "inferior.h" #include "inferior.h"
#include "regcache.h" #include "regcache.h"
#include "target.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/ptrace.h> #include <sys/ptrace.h>
#include <machine/reg.h> #include <machine/reg.h>
#include "hppa-tdep.h" #include "hppa-tdep.h"
#include "inf-ptrace.h"
static int static int
hppabsd_gregset_supplies_p (int regnum) hppabsd_gregset_supplies_p (int regnum)
@ -79,8 +81,8 @@ hppabsd_collect_gregset (const struct regcache *regcache,
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
for all registers (including the floating-point registers). */ for all registers (including the floating-point registers). */
void static void
fetch_inferior_registers (int regnum) hppabsd_fetch_registers (int regnum)
{ {
struct regcache *regcache = current_regcache; struct regcache *regcache = current_regcache;
@ -99,8 +101,8 @@ fetch_inferior_registers (int regnum)
/* Store register REGNUM back into the inferior. If REGNUM is -1, do /* Store register REGNUM back into the inferior. If REGNUM is -1, do
this for all registers (including the floating-point registers). */ this for all registers (including the floating-point registers). */
void static void
store_inferior_registers (int regnum) hppabsd_store_registers (int regnum)
{ {
if (regnum == -1 || hppabsd_gregset_supplies_p (regnum)) if (regnum == -1 || hppabsd_gregset_supplies_p (regnum))
{ {
@ -117,3 +119,18 @@ store_inferior_registers (int regnum)
perror_with_name (_("Couldn't write registers")); perror_with_name (_("Couldn't write registers"));
} }
} }
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_hppabsd_nat (void);
void
_initialize_hppabsd_nat (void)
{
struct target_ops *t;
/* Add in local overrides. */
t = inf_ptrace_target ();
t->to_fetch_registers = hppabsd_fetch_registers;
t->to_store_registers = hppabsd_store_registers;
add_target (t);
}