/* Motorola m68k target-dependent support for GNU/Linux.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of GDB.
struct frame_id this_id;
struct trad_frame_cache *cache;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct m68k_linux_sigtramp_info info;
gdb_byte buf[4];
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
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
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,
svr4_fetch_objfile_link_map);
-
- set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
}
/* Provide a prototype to silence -Wmissing-prototypes. */