summaryrefslogtreecommitdiff
path: root/gdb/vax-tdep.c
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2013-11-29 17:06:09 +0000
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2014-09-30 09:14:38 +0200
commitf73d3ce7f83e5dc0ff749685376b144ba2dae471 (patch)
tree9f26833efdf494c3e4e5d0fea2b48853b6cd17f8 /gdb/vax-tdep.c
parentcb24567a55ff937453f9b35934d3d6a0aad804b1 (diff)
downloadbinutils-gdb-f73d3ce7f83e5dc0ff749685376b144ba2dae471.tar.gz
VAX: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'
For VAX targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * vax-tdep.c (vax_regset_from_core_section): Remove. (vax_iterate_over_regset_sections): New. (vax_gdbarch_init): Adjust gdbarch initialization.
Diffstat (limited to 'gdb/vax-tdep.c')
-rw-r--r--gdb/vax-tdep.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 0f470029cc1..2793261b659 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -89,17 +89,15 @@ static const struct regset vax_gregset =
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
@@ -483,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);