/* Target-dependent code for NetBSD/hppa
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This file is part of GDB.
#include "trad-frame.h"
#include "tramp-frame.h"
-#include "gdb_assert.h"
-#include <string.h>
-
#include "hppa-tdep.h"
#include "hppabsd-tdep.h"
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
CORE_ADDR sp = get_frame_register_unsigned (this_frame, HPPA_SP_REGNUM);
CORE_ADDR base;
int *reg_offset;
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
gdb_assert (len >= HPPANBSD_SIZEOF_GREGS);
/* NetBSD/hppa register set. */
-static struct regset hppanbsd_gregset =
+static const struct regset hppanbsd_gregset =
{
NULL,
hppanbsd_supply_gregset
};
-/* Return the appropriate register set for the core section identified
- by SECT_NAME and SECT_SIZE. */
+/* Iterate over supported core file register note sections. */
-static const struct regset *
-hppanbsd_regset_from_core_section (struct gdbarch *gdbarch,
- const char *sect_name, size_t sect_size)
+static void
+hppanbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
+ iterate_over_regset_sections_cb *cb,
+ void *cb_data,
+ const struct regcache *regcache)
{
- if (strcmp (sect_name, ".reg") == 0 && sect_size >= HPPANBSD_SIZEOF_GREGS)
- return &hppanbsd_gregset;
-
- return NULL;
+ cb (".reg", HPPANBSD_SIZEOF_GREGS, &hppanbsd_gregset, NULL, cb_data);
}
\f
static void
hppabsd_init_abi (info, gdbarch);
/* Core file support. */
- set_gdbarch_regset_from_core_section
- (gdbarch, hppanbsd_regset_from_core_section);
+ set_gdbarch_iterate_over_regset_sections
+ (gdbarch, hppanbsd_iterate_over_regset_sections);
tramp_frame_prepend_unwinder (gdbarch, &hppanbsd_sigtramp_si4);
}