diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2014-03-29 09:28:30 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-09-30 09:14:34 +0200 |
commit | 50c5eb5335ff58688fd4652a40c791088a94d532 (patch) | |
tree | 33c5ec6ada1b11a6a9a9b8e6d6a3e2c3b3ed3cda /gdb/hppanbsd-tdep.c | |
parent | 66afae4f0ae73fee2ee19ced16110e184e6c0076 (diff) | |
download | gdb-50c5eb5335ff58688fd4652a40c791088a94d532.zip gdb-50c5eb5335ff58688fd4652a40c791088a94d532.tar.gz gdb-50c5eb5335ff58688fd4652a40c791088a94d532.tar.bz2 |
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.
Diffstat (limited to 'gdb/hppanbsd-tdep.c')
-rw-r--r-- | gdb/hppanbsd-tdep.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gdb/hppanbsd-tdep.c b/gdb/hppanbsd-tdep.c index b3f04c7..4587466 100644 --- a/gdb/hppanbsd-tdep.c +++ b/gdb/hppanbsd-tdep.c @@ -184,17 +184,15 @@ static const struct regset hppanbsd_gregset = hppanbsd_supply_gregset }; -/* 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 * -hppanbsd_regset_from_core_section (struct gdbarch *gdbarch, - const char *sect_name, size_t sect_size) +static void +hppanbsd_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 >= HPPANBSD_SIZEOF_GREGS) - return &hppanbsd_gregset; - - return NULL; + cb (".reg", HPPANBSD_SIZEOF_GREGS, &hppanbsd_gregset, NULL, cb_data); } static void @@ -204,8 +202,8 @@ hppanbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) hppabsd_init_abi (info, gdbarch); /* Core file support. */ - set_gdbarch_regset_from_core_section - (gdbarch, hppanbsd_regset_from_core_section); + set_gdbarch_iterate_over_regset_sections + (gdbarch, hppanbsd_iterate_over_regset_sections); tramp_frame_prepend_unwinder (gdbarch, &hppanbsd_sigtramp_si4); } |