aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppcobsd-tdep.c
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2014-09-10 08:42:07 +0000
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2014-09-30 09:14:37 +0200
commit23ea9aebceb83a7b0e00da62de37d592ba51b616 (patch)
treeacd5297ed9a4e0e0c4461fe78cf008c98de11edd /gdb/ppcobsd-tdep.c
parentc5b8d704bc8cf2fa2c6f23cbdb57c935550e6a6a (diff)
downloadgdb-23ea9aebceb83a7b0e00da62de37d592ba51b616.zip
gdb-23ea9aebceb83a7b0e00da62de37d592ba51b616.tar.gz
gdb-23ea9aebceb83a7b0e00da62de37d592ba51b616.tar.bz2
PPC: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'
For PPC targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * configure.tgt (gdb_target_obs): Add fbsd-tdep.o for PowerPC FreeBSD targets. * ppcfbsd-nat.c (_initialize_ppcfbsd_nat): Do not set target method 'make_corefile_notes'. * ppcfbsd-tdep.c (fbsd-tdep.h): Include. (ppcfbsd_regset_from_core_section): Remove. (ppcfbsd_iterate_over_regset_sections): New. (ppcfbsd_init_abi): Call fbsd_init_abi. Adjust gdbarch initialization. * ppcnbsd-tdep.c (ppcnbsd_regset_from_core_section): Remove. (ppcnbsd_iterate_over_regset_sections): New. (ppcnbsd_init_abi): Adjust. * ppcobsd-tdep.c (ppcobsd_regset_from_core_section): Remove. (ppcobsd_iterate_over_regset_sections): New. (ppcobsd_init_abi): Adjust. * rs6000-aix-tdep.c (rs6000_aix_regset_from_core_section): Remove. (rs6000_aix_iterate_over_regset_sections): New. (rs6000_aix_init_osabi): Adjust.
Diffstat (limited to 'gdb/ppcobsd-tdep.c')
-rw-r--r--gdb/ppcobsd-tdep.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/gdb/ppcobsd-tdep.c b/gdb/ppcobsd-tdep.c
index d745dd0..5e8fa43 100644
--- a/gdb/ppcobsd-tdep.c
+++ b/gdb/ppcobsd-tdep.c
@@ -80,17 +80,15 @@ const struct regset ppcobsd_fpregset =
ppc_supply_fpregset
};
-/* 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 *
-ppcobsd_regset_from_core_section (struct gdbarch *gdbarch,
- const char *sect_name, size_t sect_size)
+static void
+ppcobsd_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 >= 412)
- return &ppcobsd_gregset;
-
- return NULL;
+ cb (".reg", 412, &ppcobsd_gregset, NULL, cb_data);
}
@@ -257,8 +255,8 @@ ppcobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
- set_gdbarch_regset_from_core_section
- (gdbarch, ppcobsd_regset_from_core_section);
+ set_gdbarch_iterate_over_regset_sections
+ (gdbarch, ppcobsd_iterate_over_regset_sections);
frame_unwind_append_unwinder (gdbarch, &ppcobsd_sigtramp_frame_unwind);
}