diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2014-03-29 09:39:44 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-09-30 09:14:35 +0200 |
commit | 022c98ab88317728d2f77fc1b3726bf1717dacff (patch) | |
tree | fe62e29dbb989ebc5b97a7b1da311853afcbf7ee /gdb/m68klinux-tdep.c | |
parent | 5fac247f472389db46e7612d9e425991f77d64b7 (diff) | |
download | gdb-022c98ab88317728d2f77fc1b3726bf1717dacff.zip gdb-022c98ab88317728d2f77fc1b3726bf1717dacff.tar.gz gdb-022c98ab88317728d2f77fc1b3726bf1717dacff.tar.bz2 |
M68K: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'
For m68k BSD and GNU/Linux targets, no longer define the gdbarch
method 'regset_from_core_section', but the iterator method instead.
gdb/ChangeLog:
* m68kbsd-tdep.c (m68kbsd_regset_from_core_section): Remove.
(m68kbsd_iterate_over_regset_sections): New.
(m68kbsd_init_abi): Adjust gdbarch initialization.
* m68klinux-tdep.c (m68k_linux_regset_from_core_section): Remove.
(m68k_linux_iterate_over_regset_sections): New.
(m68k_linux_init_abi): Adjust gdbarch initialization.
Diffstat (limited to 'gdb/m68klinux-tdep.c')
-rw-r--r-- | gdb/m68klinux-tdep.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/gdb/m68klinux-tdep.c b/gdb/m68klinux-tdep.c index ae2da9a..61e3cda 100644 --- a/gdb/m68klinux-tdep.c +++ b/gdb/m68klinux-tdep.c @@ -369,23 +369,16 @@ static const struct regset m68k_linux_fpregset = regcache_supply_regset, regcache_collect_regset }; -/* Return the appropriate register set for the core section identified - by SECT_NAME and SECT_SIZE. */ +/* Iterate over core file register note sections. */ -static const struct regset * -m68k_linux_regset_from_core_section (struct gdbarch *gdbarch, - const char *sect_name, - size_t sect_size) +static void +m68k_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 - && sect_size >= M68K_LINUX_GREGS_SIZE) - return &m68k_linux_gregset; - - if (strcmp (sect_name, ".reg2") == 0 - && sect_size >= M68K_LINUX_FPREGS_SIZE) - return &m68k_linux_fpregset; - - return NULL; + cb (".reg", M68K_LINUX_GREGS_SIZE, &m68k_linux_gregset, NULL, cb_data); + cb (".reg2", M68K_LINUX_FPREGS_SIZE, &m68k_linux_fpregset, NULL, cb_data); } static void @@ -423,8 +416,8 @@ m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); /* Core file support. */ - set_gdbarch_regset_from_core_section - (gdbarch, m68k_linux_regset_from_core_section); + set_gdbarch_iterate_over_regset_sections + (gdbarch, m68k_linux_iterate_over_regset_sections); /* Enable TLS support. */ set_gdbarch_fetch_tls_load_module_address (gdbarch, |