X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fppcobsd-tdep.c;h=2cc62a0db3ba58dbf1fa1266d873eb39a1cfd54b;hb=21002a635bf3da33367592e3a3ab3cce24fe5299;hp=d745dd02ac00d817082963bf75ab17bd08c86d09;hpb=6d3d12ebef6fa7dd6bc8c34fbc5e440ac8d0a8c6;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/ppcobsd-tdep.c b/gdb/ppcobsd-tdep.c index d745dd02ac..2cc62a0db3 100644 --- a/gdb/ppcobsd-tdep.c +++ b/gdb/ppcobsd-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for OpenBSD/powerpc. - Copyright (C) 2004-2014 Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of GDB. @@ -80,17 +80,15 @@ const struct regset ppcobsd_fpregset = ppc_supply_fpregset }; -/* 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 * -ppcobsd_regset_from_core_section (struct gdbarch *gdbarch, - const char *sect_name, size_t sect_size) +static void +ppcobsd_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 >= 412) - return &ppcobsd_gregset; - - return NULL; + cb (".reg", 412, &ppcobsd_gregset, NULL, cb_data); } @@ -172,7 +170,7 @@ ppcobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) int i; if (*this_cache) - return *this_cache; + return (struct trad_frame_cache *) *this_cache; cache = trad_frame_cache_zalloc (this_frame); *this_cache = cache; @@ -257,8 +255,8 @@ ppcobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_solib_svr4_fetch_link_map_offsets (gdbarch, svr4_ilp32_fetch_link_map_offsets); - set_gdbarch_regset_from_core_section - (gdbarch, ppcobsd_regset_from_core_section); + set_gdbarch_iterate_over_regset_sections + (gdbarch, ppcobsd_iterate_over_regset_sections); frame_unwind_append_unwinder (gdbarch, &ppcobsd_sigtramp_frame_unwind); }