Index: frysk/frysk-imports/libunwind/include/tdep-ppc32/libunwind_i.h =================================================================== --- frysk.orig/frysk-imports/libunwind/include/tdep-ppc32/libunwind_i.h +++ frysk/frysk-imports/libunwind/include/tdep-ppc32/libunwind_i.h @@ -255,6 +255,7 @@ dwarf_put (struct dwarf_cursor *c, dwarf #define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) #define tdep_access_reg UNW_OBJ(access_reg) #define tdep_access_fpreg UNW_OBJ(access_fpreg) +#define tdep_fetch_proc_info_post UNW_OBJ(fetch_proc_info_post) #define tdep_get_func_addr UNW_OBJ(get_func_addr) #ifdef UNW_LOCAL_ONLY @@ -287,8 +288,10 @@ extern int tdep_search_unwind_table (unw unw_proc_info_t * pi, int need_unwind_info, void *arg); extern void *tdep_uc_addr (ucontext_t * uc, int reg); -extern int tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip, - unsigned long *segbase, unsigned long *mapoff); +extern int tdep_get_elf_image (unw_addr_space_t as, struct elf_image *ei, + pid_t pid, unw_word_t ip, + unsigned long *segbase, unsigned long *mapoff, + void *arg); extern int tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t * valp, int write); extern int tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, Index: frysk/frysk-imports/libunwind/include/tdep-ppc64/libunwind_i.h =================================================================== --- frysk.orig/frysk-imports/libunwind/include/tdep-ppc64/libunwind_i.h +++ frysk/frysk-imports/libunwind/include/tdep-ppc64/libunwind_i.h @@ -255,6 +255,7 @@ dwarf_put (struct dwarf_cursor *c, dwarf #define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) #define tdep_access_reg UNW_OBJ(access_reg) #define tdep_access_fpreg UNW_OBJ(access_fpreg) +#define tdep_fetch_proc_info_post UNW_OBJ(fetch_proc_info_post) #define tdep_get_func_addr UNW_OBJ(get_func_addr) #ifdef UNW_LOCAL_ONLY @@ -287,8 +288,9 @@ extern int tdep_search_unwind_table (unw unw_proc_info_t * pi, int need_unwind_info, void *arg); extern void *tdep_uc_addr (ucontext_t * uc, int reg); -extern int tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip, - unsigned long *segbase, unsigned long *mapoff); +extern int tdep_get_elf_image (unw_addr_space_t as, struct elf_image *ei, pid_t pid, + unw_word_t ip, unsigned long *segbase, + unsigned long *mapoff, void *arg); extern int tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t * valp, int write); extern int tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, Index: frysk/frysk-imports/libunwind/src/Makefile.am =================================================================== --- frysk.orig/frysk-imports/libunwind/src/Makefile.am +++ frysk/frysk-imports/libunwind/src/Makefile.am @@ -207,12 +207,14 @@ libunwind_x86_64_la_SOURCES_x86_64 = $(l # The list of local files that go to Power 64 and 32: libunwind_la_SOURCES_ppc = ppc/Lcreate_addr_space.c \ ppc/Lget_proc_info.c ppc/Lget_save_loc.c ppc/Linit_local.c \ - ppc/Linit_remote.c ppc/Lis_signal_frame.c + ppc/Linit_remote.c ppc/Lis_signal_frame.c \ + ppc/Lfetch_proc_info_post.c # The list of generic files that go to Power 64 and 32: libunwind_ppc_la_SOURCES_ppc_generic = ppc/Gcreate_addr_space.c \ ppc/Gget_proc_info.c ppc/Gget_save_loc.c ppc/Ginit_local.c \ - ppc/Ginit_remote.c ppc/Gis_signal_frame.c + ppc/Ginit_remote.c ppc/Gis_signal_frame.c \ + ppc/Gfetch_proc_info_post.c # The list of files that go both into libunwind and libunwind-ppc32: libunwind_la_SOURCES_ppc32_common = $(libunwind_la_SOURCES_common) \ Index: frysk/frysk-imports/libunwind/src/ppc/Gfetch_proc_info_post.c =================================================================== --- /dev/null +++ frysk/frysk-imports/libunwind/src/ppc/Gfetch_proc_info_post.c @@ -0,0 +1,51 @@ +/* libunwind - a platform-independent unwind library + Copyright (c) 2006 Hewlett-Packard Development Company, L.P. + Contributed by Jan Kratochvil + +This file is part of libunwind. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + +#include "libunwind_i.h" + +HIDDEN int +tdep_fetch_proc_info_post (struct dwarf_cursor *c, unw_word_t ip, int need_unwind_info) +{ + struct cursor *cursor = (struct cursor *) c; + + /* Should happen only if `!need_unwind_info'. */ + if (!c->pi_valid) + return 0; + /* Should happen only if `!need_unwind_info'. */ + if (!c->pi.unwind_info) + return 0; + + /* Reset the value for this frame. */ + cursor->sigcontext_format = PPC_SCF_NONE; + + /* Normal non-signal frames case. */ + if (!((struct dwarf_cie_info *) c->pi.unwind_info)->signal_frame) + return 0; + + cursor->sigcontext_format = PPC_SCF_LINUX_RT_SIGFRAME; + cursor->sigcontext_addr = c->cfa + 4; + + return 0; +} Index: frysk/frysk-imports/libunwind/src/ppc/Lfetch_proc_info_post.c =================================================================== --- /dev/null +++ frysk/frysk-imports/libunwind/src/ppc/Lfetch_proc_info_post.c @@ -0,0 +1,5 @@ +#define UNW_LOCAL_ONLY +#include +#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) +#include "Gfetch_proc_info_post.c" +#endif Index: frysk/frysk-imports/libunwind/src/ppc32/Ginit.c =================================================================== --- frysk.orig/frysk-imports/libunwind/src/ppc32/Ginit.c +++ frysk/frysk-imports/libunwind/src/ppc32/Ginit.c @@ -199,7 +199,7 @@ get_static_proc_name (unw_addr_space_t a char *buf, size_t buf_len, unw_word_t *offp, void *arg) { - return _Uelf32_get_proc_name (as, getpid (), ip, buf, buf_len, offp); + return _Uelf32_get_proc_name (as, getpid (), ip, buf, buf_len, offp, arg); } HIDDEN void Index: frysk/frysk-imports/libunwind/src/ppc64/Ginit.c =================================================================== --- frysk.orig/frysk-imports/libunwind/src/ppc64/Ginit.c +++ frysk/frysk-imports/libunwind/src/ppc64/Ginit.c @@ -208,7 +208,7 @@ get_static_proc_name (unw_addr_space_t a char *buf, size_t buf_len, unw_word_t *offp, void *arg) { - return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp); + return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp, arg); } HIDDEN void