aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-linux-tdep.c
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2014-03-29 09:28:30 +0000
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2014-09-30 09:14:34 +0200
commit50c5eb5335ff58688fd4652a40c791088a94d532 (patch)
tree33c5ec6ada1b11a6a9a9b8e6d6a3e2c3b3ed3cda /gdb/hppa-linux-tdep.c
parent66afae4f0ae73fee2ee19ced16110e184e6c0076 (diff)
downloadgdb-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/hppa-linux-tdep.c')
-rw-r--r--gdb/hppa-linux-tdep.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c
index 6bc604b..52837ee 100644
--- a/gdb/hppa-linux-tdep.c
+++ b/gdb/hppa-linux-tdep.c
@@ -472,17 +472,17 @@ static const struct regset hppa_linux_fpregset =
regcache_supply_regset, regcache_collect_regset
};
-static const struct regset *
-hppa_linux_regset_from_core_section (struct gdbarch *gdbarch,
- const char *sect_name,
- size_t sect_size)
+static void
+hppa_linux_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)
- return &hppa_linux_regset;
- else if (strcmp (sect_name, ".reg2") == 0)
- return &hppa_linux_fpregset;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- return NULL;
+ cb (".reg", 80 * tdep->bytes_per_address, &hppa_linux_regset,
+ NULL, cb_data);
+ cb (".reg2", 64 * 4, &hppa_linux_fpregset, NULL, cb_data);
}
@@ -520,8 +520,8 @@ hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
more work in gcc and glibc first. */
set_gdbarch_long_double_bit (gdbarch, 64);
- set_gdbarch_regset_from_core_section
- (gdbarch, hppa_linux_regset_from_core_section);
+ set_gdbarch_iterate_over_regset_sections
+ (gdbarch, hppa_linux_iterate_over_regset_sections);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, hppa_dwarf_reg_to_regnum);