aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2013-11-29 16:48:24 +0000
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2014-09-30 09:14:36 +0200
commitb61ddd6e2452974afa3fb8ecaf3dea74d47a0b5e (patch)
treee07987b04e4e63644fea8c74f33230e8ed9a9575 /gdb
parent55a2906a4104af66db515294b18fca1fe63ea060 (diff)
downloadgdb-b61ddd6e2452974afa3fb8ecaf3dea74d47a0b5e.zip
gdb-b61ddd6e2452974afa3fb8ecaf3dea74d47a0b5e.tar.gz
gdb-b61ddd6e2452974afa3fb8ecaf3dea74d47a0b5e.tar.bz2
M88K: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'
For M88K targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * m88k-tdep.c (m88k_regset_from_core_section): Remove. (m88k_iterate_over_regset_sections): New. (m88k_gdbarch_init): Adjust gdbarch initialization.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/m88k-tdep.c20
2 files changed, 15 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2d853d1..fa2d4ba 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2014-09-30 Andreas Arnez <arnez@linux.vnet.ibm.com>
+ * m88k-tdep.c (m88k_regset_from_core_section): Remove.
+ (m88k_iterate_over_regset_sections): New.
+ (m88k_gdbarch_init): Adjust gdbarch initialization.
+
+2014-09-30 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
* ia64-linux-tdep.c (ia64_linux_regset_from_core_section): Remove.
(ia64_linux_iterate_over_regset_sections): New.
(ia64_linux_init_abi): Adjust gdbarch initialization.
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 7c8506b..74d4b35 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -802,17 +802,15 @@ static const struct regset m88k_gregset =
m88k_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 *
-m88k_regset_from_core_section (struct gdbarch *gdbarch,
- const char *sect_name, size_t sect_size)
+static void
+m88k_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 >= M88K_NUM_REGS * 4)
- return &m88k_gregset;
-
- return NULL;
+ cb (".reg", M88K_NUM_REGS * 4, &m88k_gregset, NULL, cb_data);
}
@@ -842,8 +840,8 @@ m88k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pc_regnum (gdbarch, M88K_SXIP_REGNUM);
/* Core file support. */
- set_gdbarch_regset_from_core_section
- (gdbarch, m88k_regset_from_core_section);
+ set_gdbarch_iterate_over_regset_sections
+ (gdbarch, m88k_iterate_over_regset_sections);
set_gdbarch_print_insn (gdbarch, print_insn_m88k);