diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2014-09-02 14:34:34 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-09-30 09:14:37 +0200 |
commit | 9845a0b521d8a9a117d37dbfdec56677dd7cdae8 (patch) | |
tree | 528f194960add31f04d1617a26a0d5f68e222d90 /gdb | |
parent | 23ea9aebceb83a7b0e00da62de37d592ba51b616 (diff) | |
download | gdb-9845a0b521d8a9a117d37dbfdec56677dd7cdae8.zip gdb-9845a0b521d8a9a117d37dbfdec56677dd7cdae8.tar.gz gdb-9845a0b521d8a9a117d37dbfdec56677dd7cdae8.tar.bz2 |
SCORE: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'
For S+core targets, no longer define the gdbarch method
'regset_from_core_section', but the iterator method instead.
gdb/ChangeLog:
* score-tdep.c (score7_linux_regset_from_core_section): Remove.
(score7_linux_iterate_over_regset_sections): New.
(score_gdbarch_init): Adjust gdbarch initialization.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/score-tdep.c | 25 |
2 files changed, 16 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9d8dd86..8b216e2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2014-09-30 Andreas Arnez <arnez@linux.vnet.ibm.com> + * score-tdep.c (score7_linux_regset_from_core_section): Remove. + (score7_linux_iterate_over_regset_sections): New. + (score_gdbarch_init): Adjust gdbarch initialization. + +2014-09-30 Andreas Arnez <arnez@linux.vnet.ibm.com> + * configure.tgt (gdb_target_obs): Add fbsd-tdep.o for PowerPC FreeBSD targets. * ppcfbsd-nat.c (_initialize_ppcfbsd_nat): Do not set target diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c index d61faf0..dd438f9 100644 --- a/gdb/score-tdep.c +++ b/gdb/score-tdep.c @@ -1445,21 +1445,16 @@ static const struct regset score7_linux_gregset = regcache_collect_regset }; -/* Return the appropriate register set from the core section identified - by SECT_NAME and SECT_SIZE. */ +/* Iterate over core file register note sections. */ -static const struct regset * -score7_linux_regset_from_core_section(struct gdbarch *gdbarch, - const char *sect_name, size_t sect_size) +static void +score7_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, + iterate_over_regset_sections_cb *cb, + void *cb_data, + const struct regcache *regcache) { - gdb_assert (gdbarch != NULL); - gdb_assert (sect_name != NULL); - - if (strcmp(sect_name, ".reg") == 0 - && sect_size == SCORE7_LINUX_SIZEOF_GREGSET) - return &score7_linux_gregset; - - return NULL; + cb (".reg", SCORE7_LINUX_SIZEOF_GREGSET, &score7_linux_gregset, + NULL, cb_data); } static struct gdbarch * @@ -1504,8 +1499,8 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_name (gdbarch, score7_register_name); set_gdbarch_num_regs (gdbarch, SCORE7_NUM_REGS); /* Core file support. */ - set_gdbarch_regset_from_core_section (gdbarch, - score7_linux_regset_from_core_section); + set_gdbarch_iterate_over_regset_sections + (gdbarch, score7_linux_iterate_over_regset_sections); break; case bfd_mach_score3: |