aboutsummaryrefslogtreecommitdiff
path: root/gdb/armbsd-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/armbsd-tdep.c')
-rw-r--r--gdb/armbsd-tdep.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/gdb/armbsd-tdep.c b/gdb/armbsd-tdep.c
index 62e82b8..c4c5fd0 100644
--- a/gdb/armbsd-tdep.c
+++ b/gdb/armbsd-tdep.c
@@ -107,18 +107,14 @@ static const struct regset armbsd_fpregset =
armbsd_supply_fpregset
};
-/* Return the appropriate register set for the core section identified
- by SECT_NAME and SECT_SIZE. */
+/* Iterate over supported core file register note sections. */
-const struct regset *
-armbsd_regset_from_core_section (struct gdbarch *gdbarch,
- const char *sect_name, size_t sect_size)
+void
+armbsd_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 >= ARMBSD_SIZEOF_GREGS)
- return &armbsd_gregset;
-
- if (strcmp (sect_name, ".reg2") == 0 && sect_size >= ARMBSD_SIZEOF_FPREGS)
- return &armbsd_fpregset;
-
- return NULL;
+ cb (".reg", ARMBSD_SIZEOF_GREGS, &armbsd_gregset, NULL, cb_data);
+ cb (".reg2", ARMBSD_SIZEOF_FPREGS, &armbsd_fpregset, NULL, cb_data);
}