From 50c5eb5335ff58688fd4652a40c791088a94d532 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Sat, 29 Mar 2014 09:28:30 +0000 Subject: HPPA: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections' For HP PA-RISC targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * hppa-hpux-tdep.c (hppa_hpux_regset_from_core_section): Remove. (hppa_hpux_iterate_over_regset_sections): New. (hppa_hpux_init_abi): Adjust gdbarch initialization. * hppa-linux-tdep.c (hppa_linux_regset_from_core_section): Remove. (hppa_linux_iterate_over_regset_sections): New. (hppa_linux_init_abi): Adjust. * hppanbsd-tdep.c (hppaobsd_regset_from_core_section): Remove. (hppanbsd_iterate_over_regset_sections): New. (hppanbsd_init_abi): Adjust. * hppaobsd-tdep.c (hppaobsd_regset_from_core_section): Remove. (hppaobsd_iterate_over_regset_sections): New. (hppaobsd_init_abi): Adjust. --- gdb/hppaobsd-tdep.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'gdb/hppaobsd-tdep.c') diff --git a/gdb/hppaobsd-tdep.c b/gdb/hppaobsd-tdep.c index c521359..3d2f217 100644 --- a/gdb/hppaobsd-tdep.c +++ b/gdb/hppaobsd-tdep.c @@ -140,20 +140,16 @@ static const struct regset hppaobsd_fpregset = hppaobsd_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. */ -static const struct regset * -hppaobsd_regset_from_core_section (struct gdbarch *gdbarch, - const char *sect_name, size_t sect_size) +static void +hppaobsd_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 >= HPPAOBSD_SIZEOF_GREGS) - return &hppaobsd_gregset; - - if (strcmp (sect_name, ".reg2") == 0 && sect_size >= HPPAOBSD_SIZEOF_FPREGS) - return &hppaobsd_fpregset; - - return NULL; + cb (".reg", HPPAOBSD_SIZEOF_GREGS, &hppaobsd_gregset, NULL, cb_data); + cb (".reg2", HPPAOBSD_SIZEOF_FPREGS, &hppaobsd_fpregset, NULL, cb_data); } @@ -164,8 +160,8 @@ hppaobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) hppabsd_init_abi (info, gdbarch); /* Core file support. */ - set_gdbarch_regset_from_core_section - (gdbarch, hppaobsd_regset_from_core_section); + set_gdbarch_iterate_over_regset_sections + (gdbarch, hppaobsd_iterate_over_regset_sections); } -- cgit v1.1