X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fvax-tdep.c;h=db57bee05c7ab0278092e4212ab90a613cf353e9;hb=32b40af94e919e235c21486110311647cbeecf2e;hp=e766f0056daca1d617ed4cc3bf1d3a26b04e9dd1;hpb=0e9f083f4cb94a9dc861f38ba151aac06efce2b8;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index e766f0056d..db57bee05c 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for the VAX. - Copyright (C) 1986-2013 Free Software Foundation, Inc. + Copyright (C) 1986-2015 Free Software Foundation, Inc. This file is part of GDB. @@ -32,8 +32,6 @@ #include "trad-frame.h" #include "value.h" -#include - #include "vax-tdep.h" /* Return the name of register REGNUM. */ @@ -85,23 +83,21 @@ vax_supply_gregset (const struct regset *regset, struct regcache *regcache, /* VAX register set. */ -static struct regset vax_gregset = +static const struct regset vax_gregset = { NULL, vax_supply_gregset }; -/* Return the appropriate register set for the core section identified - by SECT_NAME and SECT_SIZE. */ +/* Iterate over core file register note sections. */ -static const struct regset * -vax_regset_from_core_section (struct gdbarch *gdbarch, - const char *sect_name, size_t sect_size) +static void +vax_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 >= VAX_NUM_REGS * 4) - return &vax_gregset; - - return NULL; + cb (".reg", VAX_NUM_REGS * 4, &vax_gregset, NULL, cb_data); } /* The VAX UNIX calling convention uses R1 to pass a structure return @@ -485,8 +481,8 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pc_regnum (gdbarch, VAX_PC_REGNUM); set_gdbarch_ps_regnum (gdbarch, VAX_PS_REGNUM); - set_gdbarch_regset_from_core_section - (gdbarch, vax_regset_from_core_section); + set_gdbarch_iterate_over_regset_sections + (gdbarch, vax_iterate_over_regset_sections); /* Frame and stack info */ set_gdbarch_skip_prologue (gdbarch, vax_skip_prologue);