diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 69 | ||||
-rw-r--r-- | src/Makefile.in | 490 | ||||
-rw-r--r-- | src/ppc/Gcreate_addr_space.c (renamed from src/ppc64/Gcreate_addr_space.c) | 2 | ||||
-rw-r--r-- | src/ppc/Gget_proc_info.c (renamed from src/ppc64/Gget_proc_info.c) | 2 | ||||
-rw-r--r-- | src/ppc/Gget_save_loc.c (renamed from src/ppc64/Gget_save_loc.c) | 2 | ||||
-rw-r--r-- | src/ppc/Ginit_local.c (renamed from src/ppc64/Ginit_local.c) | 15 | ||||
-rw-r--r-- | src/ppc/Ginit_remote.c (renamed from src/ppc64/Ginit_remote.c) | 18 | ||||
-rw-r--r-- | src/ppc/Gis_signal_frame.c (renamed from src/ppc64/Gis_signal_frame.c) | 2 | ||||
-rw-r--r-- | src/ppc/Lcreate_addr_space.c (renamed from src/ppc64/Lcreate_addr_space.c) | 0 | ||||
-rw-r--r-- | src/ppc/Lget_proc_info.c (renamed from src/ppc64/Lget_proc_info.c) | 0 | ||||
-rw-r--r-- | src/ppc/Lget_save_loc.c (renamed from src/ppc64/Lget_save_loc.c) | 0 | ||||
-rw-r--r-- | src/ppc/Linit_local.c (renamed from src/ppc64/Linit_local.c) | 0 | ||||
-rw-r--r-- | src/ppc/Linit_remote.c (renamed from src/ppc64/Linit_remote.c) | 0 | ||||
-rw-r--r-- | src/ppc/Lis_signal_frame.c (renamed from src/ppc64/Lis_signal_frame.c) | 0 | ||||
-rw-r--r-- | src/ppc/longjmp.S (renamed from src/ppc64/longjmp.S) | 0 | ||||
-rw-r--r-- | src/ppc/siglongjmp.S (renamed from src/ppc64/siglongjmp.S) | 0 | ||||
-rw-r--r-- | src/ppc32/Gglobal.c | 150 | ||||
-rw-r--r-- | src/ppc32/Ginit.c | 221 | ||||
-rw-r--r-- | src/ppc32/Gregs.c | 90 | ||||
-rw-r--r-- | src/ppc32/Gresume.c | 77 | ||||
-rw-r--r-- | src/ppc32/Gstep.c | 317 | ||||
-rw-r--r-- | src/ppc32/Lglobal.c | 5 | ||||
-rw-r--r-- | src/ppc32/Linit.c | 5 | ||||
-rw-r--r-- | src/ppc32/Lregs.c | 5 | ||||
-rw-r--r-- | src/ppc32/Lresume.c | 5 | ||||
-rw-r--r-- | src/ppc32/Lstep.c | 5 | ||||
-rw-r--r-- | src/ppc32/Make-arch.in (renamed from src/ppc64/Make-arch.in) | 0 | ||||
-rw-r--r-- | src/ppc32/get_func_addr.c | 45 | ||||
-rw-r--r-- | src/ppc32/init.h | 80 | ||||
-rw-r--r-- | src/ppc32/is_fpreg.c | 34 | ||||
-rw-r--r-- | src/ppc32/regname.c | 128 | ||||
-rw-r--r-- | src/ppc32/setcontext.S | 4 | ||||
-rw-r--r-- | src/ppc32/ucontext_i.h | 173 | ||||
-rw-r--r-- | src/ppc32/unwind_i.h | 47 | ||||
-rw-r--r-- | src/ppc64/Gstep.c | 2 | ||||
-rw-r--r-- | src/ppc64/init.h | 4 | ||||
-rw-r--r-- | src/ptrace/_UPT_reg_offset.c | 1 |
37 files changed, 1806 insertions, 192 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 2e403988..88bb20b1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -38,7 +38,8 @@ libunwind_setjmp_la_SOURCES_ia64 = ia64/setjmp.S ia64/sigsetjmp.S \ libunwind_setjmp_la_SOURCES_hppa = hppa/siglongjmp.S libunwind_setjmp_la_SOURCES_x86 = x86/longjmp.S x86/siglongjmp.S libunwind_setjmp_la_SOURCES_x86_64 = x86_64/longjmp.S x86_64/siglongjmp.S -libunwind_setjmp_la_SOURCES_ppc64 = ppc64/longjmp.S ppc64/siglongjmp.S +libunwind_setjmp_la_SOURCES_ppc64 = ppc/longjmp.S ppc/siglongjmp.S +libunwind_setjmp_la_SOURCES_ppc32 = ppc/longjmp.S ppc/siglongjmp.S ### libunwind: @@ -204,6 +205,41 @@ libunwind_x86_64_la_SOURCES_x86_64 = $(libunwind_la_SOURCES_x86_64_common) \ x86_64/Gis_signal_frame.c x86_64/Gget_proc_info.c x86_64/Gregs.c \ x86_64/Gresume.c x86_64/Gstep.c +# 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 + +# 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 + +# The list of files that go both into libunwind and libunwind-ppc32: +libunwind_la_SOURCES_ppc32_common = $(libunwind_la_SOURCES_common) \ + $(dwarf_SOURCES_common) \ + elf32.c elf32.h \ + ppc32/init.h ppc32/unwind_i.h ppc32/ucontext_i.h \ + ppc32/is_fpreg.c ppc32/regname.c ppc32/get_func_addr.c + +# The list of files that go into libunwind: +libunwind_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \ + $(libunwind_la_SOURCES_local) \ + $(dwarf_SOURCES_local) \ + $(libunwind_la_SOURCES_ppc) \ + dwarf/Lfind_proc_info-lsb.c \ + ppc32/Lglobal.c ppc32/Linit.c \ + ppc32/Lregs.c ppc32/Lresume.c ppc32/Lstep.c + +# The list of files that go into libunwind-ppc32: +libunwind_ppc32_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \ + $(libunwind_la_SOURCES_generic) \ + $(dwarf_SOURCES_generic) \ + $(libunwind_ppc_la_SOURCES_ppc_generic) \ + dwarf/Gfind_proc_info-lsb.c \ + ppc32/Gglobal.c ppc32/Ginit.c \ + ppc32/Gregs.c ppc32/Gresume.c ppc32/Gstep.c + # The list of files that go both into libunwind and libunwind-ppc64: libunwind_la_SOURCES_ppc64_common = $(libunwind_la_SOURCES_common) \ $(dwarf_SOURCES_common) \ @@ -215,24 +251,19 @@ libunwind_la_SOURCES_ppc64_common = $(libunwind_la_SOURCES_common) \ libunwind_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \ $(libunwind_la_SOURCES_local) \ $(dwarf_SOURCES_local) \ + $(libunwind_la_SOURCES_ppc) \ dwarf/Lfind_proc_info-lsb.c \ - ppc64/Lcreate_addr_space.c ppc64/Lget_save_loc.c \ - ppc64/Lglobal.c ppc64/Linit.c ppc64/Linit_local.c \ - ppc64/Linit_remote.c ppc64/Lis_signal_frame.c \ - ppc64/Lget_proc_info.c ppc64/Lregs.c \ - ppc64/Lresume.c ppc64/Lstep.c + ppc64/Lglobal.c ppc64/Linit.c \ + ppc64/Lregs.c ppc64/Lresume.c ppc64/Lstep.c # The list of files that go into libunwind-ppc64: libunwind_ppc64_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \ $(libunwind_la_SOURCES_generic) \ $(dwarf_SOURCES_generic) \ + $(libunwind_ppc_la_SOURCES_ppc_generic) \ dwarf/Gfind_proc_info-lsb.c \ - ppc64/Gcreate_addr_space.c \ - ppc64/Gget_proc_info.c \ - ppc64/Gget_save_loc.c ppc64/Gglobal.c \ - ppc64/Ginit.c ppc64/Ginit_local.c ppc64/Ginit_remote.c \ - ppc64/Gis_signal_frame.c ppc64/Gregs.c ppc64/Gresume.c \ - ppc64/Gstep.c + ppc64/Gglobal.c ppc64/Ginit.c \ + ppc64/Gregs.c ppc64/Gresume.c ppc64/Gstep.c if REMOTE_ONLY install-exec-hook: @@ -309,7 +340,17 @@ if !REMOTE_ONLY endif libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \ $(libunwind_setjmp_la_SOURCES_x86_64) - +else +if ARCH_PPC32 + lib_LTLIBRARIES_arch = libunwind-ppc32.la + libunwind_la_SOURCES = $(libunwind_la_SOURCES_ppc32) + libunwind_ppc32_la_SOURCES = $(libunwind_ppc32_la_SOURCES_ppc32) + libunwind_ppc32_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) +if !REMOTE_ONLY + libunwind_ppc32_la_LIBADD = libunwind.la -lc +endif + libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \ + $(libunwind_setjmp_la_SOURCES_ppc32) else if ARCH_PPC64 lib_LTLIBRARIES_arch = libunwind-ppc64.la @@ -323,6 +364,7 @@ endif $(libunwind_setjmp_la_SOURCES_ppc64) endif # ARCH_PPC64 +endif # ARCH_PPC32 endif # ARCH_X86_64 endif # ARCH_X86 endif # ARCH_HPPA @@ -362,6 +404,7 @@ EXTRA_DIST = elfxx.h elfxx.c unwind/unwind-internal.h \ $(libunwind_setjmp_la_SOURCES_ia64) \ $(libunwind_setjmp_la_SOURCES_x86) \ $(libunwind_setjmp_la_SOURCES_x86_64) \ + $(libunwind_setjmp_la_SOURCES_ppc32) \ $(libunwind_setjmp_la_SOURCES_ppc64) diff --git a/src/Makefile.in b/src/Makefile.in index 3991c310..11f3c61e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -150,7 +150,37 @@ am__objects_11 = $(am__objects_10) $(am__objects_7) \ @ARCH_IA64_TRUE@am_libunwind_ia64_la_OBJECTS = $(am__objects_11) libunwind_ia64_la_OBJECTS = $(am_libunwind_ia64_la_OBJECTS) @ARCH_IA64_TRUE@am_libunwind_ia64_la_rpath = -rpath $(libdir) -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@@REMOTE_ONLY_FALSE@libunwind_ppc64_la_DEPENDENCIES = libunwind.la +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@@REMOTE_ONLY_FALSE@libunwind_ppc32_la_DEPENDENCIES = libunwind.la +am__libunwind_ppc32_la_SOURCES_DIST = os-hpux.c os-linux.h os-linux.c \ + mi/init.c mi/flush_cache.c mi/mempool.c mi/strerror.c \ + dwarf/global.c elf32.c elf32.h ppc32/init.h ppc32/unwind_i.h \ + ppc32/ucontext_i.h ppc32/is_fpreg.c ppc32/regname.c \ + ppc32/get_func_addr.c mi/Gdyn-extract.c mi/Gdyn-remote.c \ + mi/Gfind_dynamic_proc_info.c mi/Gget_accessors.c \ + mi/Gget_proc_info_by_ip.c mi/Gget_proc_name.c \ + mi/Gput_dynamic_unwind_info.c mi/Gdestroy_addr_space.c \ + mi/Gget_reg.c mi/Gset_reg.c mi/Gget_fpreg.c mi/Gset_fpreg.c \ + mi/Gset_caching_policy.c dwarf/Gexpr.c dwarf/Gfde.c \ + dwarf/Gparser.c dwarf/Gpe.c dwarf/Gstep.c \ + 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 dwarf/Gfind_proc_info-lsb.c \ + ppc32/Gglobal.c ppc32/Ginit.c ppc32/Gregs.c ppc32/Gresume.c \ + ppc32/Gstep.c +am__objects_12 = $(am__objects_4) $(am__objects_5) elf32.lo \ + ppc32/is_fpreg.lo ppc32/regname.lo ppc32/get_func_addr.lo +am__objects_13 = ppc/Gcreate_addr_space.lo ppc/Gget_proc_info.lo \ + ppc/Gget_save_loc.lo ppc/Ginit_local.lo ppc/Ginit_remote.lo \ + ppc/Gis_signal_frame.lo +am__objects_14 = $(am__objects_12) $(am__objects_7) $(am__objects_8) \ + $(am__objects_13) dwarf/Gfind_proc_info-lsb.lo \ + ppc32/Gglobal.lo ppc32/Ginit.lo ppc32/Gregs.lo \ + ppc32/Gresume.lo ppc32/Gstep.lo +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_ppc32_la_OBJECTS = $(am__objects_14) +libunwind_ppc32_la_OBJECTS = $(am_libunwind_ppc32_la_OBJECTS) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_ppc32_la_rpath = -rpath \ +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@ $(libdir) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@@REMOTE_ONLY_FALSE@libunwind_ppc64_la_DEPENDENCIES = libunwind.la am__libunwind_ppc64_la_SOURCES_DIST = os-hpux.c os-linux.h os-linux.c \ mi/init.c mi/flush_cache.c mi/mempool.c mi/strerror.c \ dwarf/global.c elf64.c elf64.h ppc64/init.h ppc64/unwind_i.h \ @@ -162,47 +192,47 @@ am__libunwind_ppc64_la_SOURCES_DIST = os-hpux.c os-linux.h os-linux.c \ mi/Gget_reg.c mi/Gset_reg.c mi/Gget_fpreg.c mi/Gset_fpreg.c \ mi/Gset_caching_policy.c dwarf/Gexpr.c dwarf/Gfde.c \ dwarf/Gparser.c dwarf/Gpe.c dwarf/Gstep.c \ - dwarf/Gfind_proc_info-lsb.c ppc64/Gcreate_addr_space.c \ - ppc64/Gget_proc_info.c ppc64/Gget_save_loc.c ppc64/Gglobal.c \ - ppc64/Ginit.c ppc64/Ginit_local.c ppc64/Ginit_remote.c \ - ppc64/Gis_signal_frame.c ppc64/Gregs.c ppc64/Gresume.c \ + 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 dwarf/Gfind_proc_info-lsb.c \ + ppc64/Gglobal.c ppc64/Ginit.c ppc64/Gregs.c ppc64/Gresume.c \ ppc64/Gstep.c -am__objects_12 = $(am__objects_4) $(am__objects_5) elf64.lo \ +am__objects_15 = $(am__objects_4) $(am__objects_5) elf64.lo \ ppc64/is_fpreg.lo ppc64/regname.lo ppc64/get_func_addr.lo -am__objects_13 = $(am__objects_12) $(am__objects_7) $(am__objects_8) \ - dwarf/Gfind_proc_info-lsb.lo ppc64/Gcreate_addr_space.lo \ - ppc64/Gget_proc_info.lo ppc64/Gget_save_loc.lo \ - ppc64/Gglobal.lo ppc64/Ginit.lo ppc64/Ginit_local.lo \ - ppc64/Ginit_remote.lo ppc64/Gis_signal_frame.lo ppc64/Gregs.lo \ +am__objects_16 = $(am__objects_15) $(am__objects_7) $(am__objects_8) \ + $(am__objects_13) dwarf/Gfind_proc_info-lsb.lo \ + ppc64/Gglobal.lo ppc64/Ginit.lo ppc64/Gregs.lo \ ppc64/Gresume.lo ppc64/Gstep.lo -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_ppc64_la_OBJECTS = $(am__objects_13) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_ppc64_la_OBJECTS = $(am__objects_16) libunwind_ppc64_la_OBJECTS = $(am_libunwind_ppc64_la_OBJECTS) -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_ppc64_la_rpath = -rpath \ -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@ $(libdir) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_ppc64_la_rpath = -rpath \ +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@ $(libdir) libunwind_setjmp_la_DEPENDENCIES = libunwind-$(arch).la am__libunwind_setjmp_la_SOURCES_DIST = setjmp/setjmp_i.h \ - setjmp/longjmp.c setjmp/siglongjmp.c ppc64/longjmp.S \ - ppc64/siglongjmp.S x86_64/longjmp.S x86_64/siglongjmp.S \ + setjmp/longjmp.c setjmp/siglongjmp.c ppc/longjmp.S \ + ppc/siglongjmp.S x86_64/longjmp.S x86_64/siglongjmp.S \ x86/longjmp.S x86/siglongjmp.S hppa/siglongjmp.S ia64/setjmp.S \ ia64/sigsetjmp.S ia64/longjmp.S ia64/siglongjmp.S -am__objects_14 = setjmp/longjmp.lo setjmp/siglongjmp.lo -am__objects_15 = ppc64/longjmp.lo ppc64/siglongjmp.lo -am__objects_16 = x86_64/longjmp.lo x86_64/siglongjmp.lo -am__objects_17 = x86/longjmp.lo x86/siglongjmp.lo -am__objects_18 = hppa/siglongjmp.lo -am__objects_19 = ia64/setjmp.lo ia64/sigsetjmp.lo ia64/longjmp.lo \ +am__objects_17 = setjmp/longjmp.lo setjmp/siglongjmp.lo +am__objects_18 = ppc/longjmp.lo ppc/siglongjmp.lo +am__objects_19 = x86_64/longjmp.lo x86_64/siglongjmp.lo +am__objects_20 = x86/longjmp.lo x86/siglongjmp.lo +am__objects_21 = hppa/siglongjmp.lo +am__objects_22 = ia64/setjmp.lo ia64/sigsetjmp.lo ia64/longjmp.lo \ ia64/siglongjmp.lo -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_setjmp_la_OBJECTS = $(am__objects_14) \ -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@ $(am__objects_15) -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@am_libunwind_setjmp_la_OBJECTS = $(am__objects_14) \ -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@ $(am__objects_16) -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@am_libunwind_setjmp_la_OBJECTS = $(am__objects_14) \ -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@ $(am__objects_17) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_setjmp_la_OBJECTS = $(am__objects_17) \ +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@ $(am__objects_18) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_setjmp_la_OBJECTS = $(am__objects_17) \ +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@ $(am__objects_18) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@am_libunwind_setjmp_la_OBJECTS = $(am__objects_17) \ +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@ $(am__objects_19) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@am_libunwind_setjmp_la_OBJECTS = $(am__objects_17) \ +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@ $(am__objects_20) @ARCH_HPPA_TRUE@@ARCH_IA64_FALSE@am_libunwind_setjmp_la_OBJECTS = \ -@ARCH_HPPA_TRUE@@ARCH_IA64_FALSE@ $(am__objects_14) \ -@ARCH_HPPA_TRUE@@ARCH_IA64_FALSE@ $(am__objects_18) -@ARCH_IA64_TRUE@am_libunwind_setjmp_la_OBJECTS = $(am__objects_14) \ -@ARCH_IA64_TRUE@ $(am__objects_19) +@ARCH_HPPA_TRUE@@ARCH_IA64_FALSE@ $(am__objects_17) \ +@ARCH_HPPA_TRUE@@ARCH_IA64_FALSE@ $(am__objects_21) +@ARCH_IA64_TRUE@am_libunwind_setjmp_la_OBJECTS = $(am__objects_17) \ +@ARCH_IA64_TRUE@ $(am__objects_22) libunwind_setjmp_la_OBJECTS = $(am_libunwind_setjmp_la_OBJECTS) @REMOTE_ONLY_FALSE@am_libunwind_setjmp_la_rpath = -rpath $(libdir) @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@@REMOTE_ONLY_FALSE@libunwind_x86_la_DEPENDENCIES = libunwind.la @@ -221,14 +251,14 @@ am__libunwind_x86_la_SOURCES_DIST = os-hpux.c os-linux.h os-linux.c \ x86/Ginit.c x86/Ginit_local.c x86/Ginit_remote.c \ x86/Gis_signal_frame.c x86/Gget_proc_info.c x86/Gregs.c \ x86/Gresume.c x86/Gstep.c -am__objects_20 = $(am__objects_4) $(am__objects_5) elf32.lo \ +am__objects_23 = $(am__objects_4) $(am__objects_5) elf32.lo \ x86/is_fpreg.lo x86/regname.lo -am__objects_21 = $(am__objects_20) $(am__objects_7) $(am__objects_8) \ +am__objects_24 = $(am__objects_23) $(am__objects_7) $(am__objects_8) \ dwarf/Gfind_proc_info-lsb.lo x86/Gcreate_addr_space.lo \ x86/Gget_save_loc.lo x86/Gglobal.lo x86/Ginit.lo \ x86/Ginit_local.lo x86/Ginit_remote.lo x86/Gis_signal_frame.lo \ x86/Gget_proc_info.lo x86/Gregs.lo x86/Gresume.lo x86/Gstep.lo -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@am_libunwind_x86_la_OBJECTS = $(am__objects_21) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@am_libunwind_x86_la_OBJECTS = $(am__objects_24) libunwind_x86_la_OBJECTS = $(am_libunwind_x86_la_OBJECTS) @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@am_libunwind_x86_la_rpath = \ @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@ -rpath \ @@ -250,15 +280,15 @@ am__libunwind_x86_64_la_SOURCES_DIST = os-hpux.c os-linux.h os-linux.c \ x86_64/Ginit_local.c x86_64/Ginit_remote.c \ x86_64/Gis_signal_frame.c x86_64/Gget_proc_info.c \ x86_64/Gregs.c x86_64/Gresume.c x86_64/Gstep.c -am__objects_22 = $(am__objects_4) $(am__objects_5) elf64.lo \ +am__objects_25 = $(am__objects_4) $(am__objects_5) elf64.lo \ x86_64/is_fpreg.lo x86_64/regname.lo -am__objects_23 = $(am__objects_22) $(am__objects_7) $(am__objects_8) \ +am__objects_26 = $(am__objects_25) $(am__objects_7) $(am__objects_8) \ dwarf/Gfind_proc_info-lsb.lo x86_64/Gcreate_addr_space.lo \ x86_64/Gget_save_loc.lo x86_64/Gglobal.lo x86_64/Ginit.lo \ x86_64/Ginit_local.lo x86_64/Ginit_remote.lo \ x86_64/Gis_signal_frame.lo x86_64/Gget_proc_info.lo \ x86_64/Gregs.lo x86_64/Gresume.lo x86_64/Gstep.lo -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@am_libunwind_x86_64_la_OBJECTS = $(am__objects_23) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@am_libunwind_x86_64_la_OBJECTS = $(am__objects_26) libunwind_x86_64_la_OBJECTS = $(am_libunwind_x86_64_la_OBJECTS) @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@am_libunwind_x86_64_la_rpath = -rpath \ @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@ $(libdir) @@ -283,26 +313,28 @@ am__libunwind_la_SOURCES_DIST = os-hpux.c os-linux.h os-linux.c \ unwind/GetTextRelBase.c unwind/RaiseException.c \ unwind/Resume.c unwind/Resume_or_Rethrow.c unwind/SetGR.c \ unwind/SetIP.c dwarf/Lexpr.c dwarf/Lfde.c dwarf/Lparser.c \ - dwarf/Lpe.c dwarf/Lstep.c dwarf/Lfind_proc_info-lsb.c \ - ppc64/Lcreate_addr_space.c ppc64/Lget_save_loc.c \ - ppc64/Lglobal.c ppc64/Linit.c ppc64/Linit_local.c \ - ppc64/Linit_remote.c ppc64/Lis_signal_frame.c \ - ppc64/Lget_proc_info.c ppc64/Lregs.c ppc64/Lresume.c \ - ppc64/Lstep.c x86_64/init.h x86_64/unwind_i.h \ + dwarf/Lpe.c dwarf/Lstep.c 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 \ + dwarf/Lfind_proc_info-lsb.c ppc64/Lglobal.c ppc64/Linit.c \ + ppc64/Lregs.c ppc64/Lresume.c ppc64/Lstep.c elf32.c elf32.h \ + ppc32/init.h ppc32/unwind_i.h ppc32/ucontext_i.h \ + ppc32/is_fpreg.c ppc32/regname.c ppc32/get_func_addr.c \ + ppc32/Lglobal.c ppc32/Linit.c ppc32/Lregs.c ppc32/Lresume.c \ + ppc32/Lstep.c x86_64/init.h x86_64/unwind_i.h \ x86_64/ucontext_i.h x86_64/is_fpreg.c x86_64/regname.c \ x86_64/offsets.h x86_64/setcontext.S \ x86_64/Lcreate_addr_space.c x86_64/Lget_save_loc.c \ x86_64/Lglobal.c x86_64/Linit.c x86_64/Linit_local.c \ x86_64/Linit_remote.c x86_64/Lis_signal_frame.c \ x86_64/Lget_proc_info.c x86_64/Lregs.c x86_64/Lresume.c \ - x86_64/Lstep.c elf32.c elf32.h x86/init.h x86/offsets.h \ - x86/unwind_i.h x86/is_fpreg.c x86/regname.c \ - x86/Lcreate_addr_space.c x86/Lget_save_loc.c x86/Lglobal.c \ - x86/Linit.c x86/Linit_local.c x86/Linit_remote.c \ - x86/Lis_signal_frame.c x86/Lget_proc_info.c x86/Lregs.c \ - x86/Lresume.c x86/Lstep.c hppa/init.h hppa/offsets.h \ - hppa/unwind_i.h hppa/regname.c hppa/getcontext.S \ - hppa/setcontext.S hppa/Lcreate_addr_space.c \ + x86_64/Lstep.c x86/init.h x86/offsets.h x86/unwind_i.h \ + x86/is_fpreg.c x86/regname.c x86/Lcreate_addr_space.c \ + x86/Lget_save_loc.c x86/Lglobal.c x86/Linit.c \ + x86/Linit_local.c x86/Linit_remote.c x86/Lis_signal_frame.c \ + x86/Lget_proc_info.c x86/Lregs.c x86/Lresume.c x86/Lstep.c \ + hppa/init.h hppa/offsets.h hppa/unwind_i.h hppa/regname.c \ + hppa/getcontext.S hppa/setcontext.S hppa/Lcreate_addr_space.c \ hppa/Lget_save_loc.c hppa/Lglobal.c hppa/Linit.c \ hppa/Linit_local.c hppa/Linit_remote.c hppa/Lis_signal_frame.c \ hppa/Lget_proc_info.c hppa/Lregs.c hppa/Lresume.c hppa/Lstep.c \ @@ -315,9 +347,9 @@ am__libunwind_la_SOURCES_DIST = os-hpux.c os-linux.h os-linux.c \ ia64/Lis_signal_frame.c ia64/Lparser.c ia64/Lrbs.c \ ia64/Lregs.c ia64/Lresume.c ia64/Lscript.c ia64/Lstep.c \ ia64/Ltables.c -am__objects_24 = mi/_ReadULEB.lo mi/_ReadSLEB.lo -@OS_LINUX_TRUE@am__objects_25 = $(am__objects_24) -am__objects_26 = $(am__objects_25) mi/backtrace.lo mi/dyn-cancel.lo \ +am__objects_27 = mi/_ReadULEB.lo mi/_ReadSLEB.lo +@OS_LINUX_TRUE@am__objects_28 = $(am__objects_27) +am__objects_29 = $(am__objects_28) mi/backtrace.lo mi/dyn-cancel.lo \ mi/dyn-info-list.lo mi/dyn-register.lo mi/Ldyn-extract.lo \ mi/Lfind_dynamic_proc_info.lo mi/Lget_accessors.lo \ mi/Lget_proc_info_by_ip.lo mi/Lget_proc_name.lo \ @@ -331,34 +363,39 @@ am__objects_26 = $(am__objects_25) mi/backtrace.lo mi/dyn-cancel.lo \ unwind/GetTextRelBase.lo unwind/RaiseException.lo \ unwind/Resume.lo unwind/Resume_or_Rethrow.lo unwind/SetGR.lo \ unwind/SetIP.lo -am__objects_27 = dwarf/Lexpr.lo dwarf/Lfde.lo dwarf/Lparser.lo \ +am__objects_30 = dwarf/Lexpr.lo dwarf/Lfde.lo dwarf/Lparser.lo \ dwarf/Lpe.lo dwarf/Lstep.lo -am__objects_28 = $(am__objects_12) $(am__objects_26) $(am__objects_27) \ - dwarf/Lfind_proc_info-lsb.lo ppc64/Lcreate_addr_space.lo \ - ppc64/Lget_save_loc.lo ppc64/Lglobal.lo ppc64/Linit.lo \ - ppc64/Linit_local.lo ppc64/Linit_remote.lo \ - ppc64/Lis_signal_frame.lo ppc64/Lget_proc_info.lo \ - ppc64/Lregs.lo ppc64/Lresume.lo ppc64/Lstep.lo -am__objects_29 = $(am__objects_22) $(am__objects_26) $(am__objects_27) \ +am__objects_31 = ppc/Lcreate_addr_space.lo ppc/Lget_proc_info.lo \ + ppc/Lget_save_loc.lo ppc/Linit_local.lo ppc/Linit_remote.lo \ + ppc/Lis_signal_frame.lo +am__objects_32 = $(am__objects_15) $(am__objects_29) $(am__objects_30) \ + $(am__objects_31) dwarf/Lfind_proc_info-lsb.lo \ + ppc64/Lglobal.lo ppc64/Linit.lo ppc64/Lregs.lo \ + ppc64/Lresume.lo ppc64/Lstep.lo +am__objects_33 = $(am__objects_12) $(am__objects_29) $(am__objects_30) \ + $(am__objects_31) dwarf/Lfind_proc_info-lsb.lo \ + ppc32/Lglobal.lo ppc32/Linit.lo ppc32/Lregs.lo \ + ppc32/Lresume.lo ppc32/Lstep.lo +am__objects_34 = $(am__objects_25) $(am__objects_29) $(am__objects_30) \ dwarf/Lfind_proc_info-lsb.lo x86_64/setcontext.lo \ x86_64/Lcreate_addr_space.lo x86_64/Lget_save_loc.lo \ x86_64/Lglobal.lo x86_64/Linit.lo x86_64/Linit_local.lo \ x86_64/Linit_remote.lo x86_64/Lis_signal_frame.lo \ x86_64/Lget_proc_info.lo x86_64/Lregs.lo x86_64/Lresume.lo \ x86_64/Lstep.lo -am__objects_30 = $(am__objects_20) $(am__objects_26) $(am__objects_27) \ +am__objects_35 = $(am__objects_23) $(am__objects_29) $(am__objects_30) \ dwarf/Lfind_proc_info-lsb.lo x86/Lcreate_addr_space.lo \ x86/Lget_save_loc.lo x86/Lglobal.lo x86/Linit.lo \ x86/Linit_local.lo x86/Linit_remote.lo x86/Lis_signal_frame.lo \ x86/Lget_proc_info.lo x86/Lregs.lo x86/Lresume.lo x86/Lstep.lo -am__objects_31 = $(am__objects_6) $(am__objects_26) hppa/getcontext.lo \ - hppa/setcontext.lo $(am__objects_27) \ +am__objects_36 = $(am__objects_6) $(am__objects_29) hppa/getcontext.lo \ + hppa/setcontext.lo $(am__objects_30) \ dwarf/Lfind_proc_info-lsb.lo hppa/Lcreate_addr_space.lo \ hppa/Lget_save_loc.lo hppa/Lglobal.lo hppa/Linit.lo \ hppa/Linit_local.lo hppa/Linit_remote.lo \ hppa/Lis_signal_frame.lo hppa/Lget_proc_info.lo hppa/Lregs.lo \ hppa/Lresume.lo hppa/Lstep.lo -am__objects_32 = $(am__objects_10) $(am__objects_26) \ +am__objects_37 = $(am__objects_10) $(am__objects_29) \ ia64/dyn_info_list.lo ia64/getcontext.lo \ ia64/Lcreate_addr_space.lo ia64/Lget_proc_info.lo \ ia64/Lget_save_loc.lo ia64/Lglobal.lo ia64/Linit.lo \ @@ -366,12 +403,13 @@ am__objects_32 = $(am__objects_10) $(am__objects_26) \ ia64/Linstall_cursor.lo ia64/Lis_signal_frame.lo \ ia64/Lparser.lo ia64/Lrbs.lo ia64/Lregs.lo ia64/Lresume.lo \ ia64/Lscript.lo ia64/Lstep.lo ia64/Ltables.lo -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_la_OBJECTS = $(am__objects_28) -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@am_libunwind_la_OBJECTS = $(am__objects_29) -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@am_libunwind_la_OBJECTS = $(am__objects_30) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_la_OBJECTS = $(am__objects_32) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@am_libunwind_la_OBJECTS = $(am__objects_33) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@am_libunwind_la_OBJECTS = $(am__objects_34) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@am_libunwind_la_OBJECTS = $(am__objects_35) @ARCH_HPPA_TRUE@@ARCH_IA64_FALSE@am_libunwind_la_OBJECTS = \ -@ARCH_HPPA_TRUE@@ARCH_IA64_FALSE@ $(am__objects_31) -@ARCH_IA64_TRUE@am_libunwind_la_OBJECTS = $(am__objects_32) +@ARCH_HPPA_TRUE@@ARCH_IA64_FALSE@ $(am__objects_36) +@ARCH_IA64_TRUE@am_libunwind_la_OBJECTS = $(am__objects_37) libunwind_la_OBJECTS = $(am_libunwind_la_OBJECTS) @REMOTE_ONLY_FALSE@am_libunwind_la_rpath = -rpath $(libdir) PROGRAMS = $(noinst_PROGRAMS) @@ -400,13 +438,15 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libunwind_ptrace_a_SOURCES) $(libunwind_hppa_la_SOURCES) \ - $(libunwind_ia64_la_SOURCES) $(libunwind_ppc64_la_SOURCES) \ - $(libunwind_setjmp_la_SOURCES) $(libunwind_x86_la_SOURCES) \ - $(libunwind_x86_64_la_SOURCES) $(libunwind_la_SOURCES) \ - $(ia64_mk_Gcursor_i_SOURCES) $(ia64_mk_Lcursor_i_SOURCES) + $(libunwind_ia64_la_SOURCES) $(libunwind_ppc32_la_SOURCES) \ + $(libunwind_ppc64_la_SOURCES) $(libunwind_setjmp_la_SOURCES) \ + $(libunwind_x86_la_SOURCES) $(libunwind_x86_64_la_SOURCES) \ + $(libunwind_la_SOURCES) $(ia64_mk_Gcursor_i_SOURCES) \ + $(ia64_mk_Lcursor_i_SOURCES) DIST_SOURCES = $(libunwind_ptrace_a_SOURCES) \ $(am__libunwind_hppa_la_SOURCES_DIST) \ $(am__libunwind_ia64_la_SOURCES_DIST) \ + $(am__libunwind_ppc32_la_SOURCES_DIST) \ $(am__libunwind_ppc64_la_SOURCES_DIST) \ $(am__libunwind_setjmp_la_SOURCES_DIST) \ $(am__libunwind_x86_la_SOURCES_DIST) \ @@ -596,7 +636,8 @@ libunwind_setjmp_la_SOURCES_ia64 = ia64/setjmp.S ia64/sigsetjmp.S \ libunwind_setjmp_la_SOURCES_hppa = hppa/siglongjmp.S libunwind_setjmp_la_SOURCES_x86 = x86/longjmp.S x86/siglongjmp.S libunwind_setjmp_la_SOURCES_x86_64 = x86_64/longjmp.S x86_64/siglongjmp.S -libunwind_setjmp_la_SOURCES_ppc64 = ppc64/longjmp.S ppc64/siglongjmp.S +libunwind_setjmp_la_SOURCES_ppc64 = ppc/longjmp.S ppc/siglongjmp.S +libunwind_setjmp_la_SOURCES_ppc32 = ppc/longjmp.S ppc/siglongjmp.S ### libunwind: @@ -776,6 +817,46 @@ libunwind_x86_64_la_SOURCES_x86_64 = $(libunwind_la_SOURCES_x86_64_common) \ x86_64/Gresume.c x86_64/Gstep.c +# 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 + + +# 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 + + +# The list of files that go both into libunwind and libunwind-ppc32: +libunwind_la_SOURCES_ppc32_common = $(libunwind_la_SOURCES_common) \ + $(dwarf_SOURCES_common) \ + elf32.c elf32.h \ + ppc32/init.h ppc32/unwind_i.h ppc32/ucontext_i.h \ + ppc32/is_fpreg.c ppc32/regname.c ppc32/get_func_addr.c + + +# The list of files that go into libunwind: +libunwind_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \ + $(libunwind_la_SOURCES_local) \ + $(dwarf_SOURCES_local) \ + $(libunwind_la_SOURCES_ppc) \ + dwarf/Lfind_proc_info-lsb.c \ + ppc32/Lglobal.c ppc32/Linit.c \ + ppc32/Lregs.c ppc32/Lresume.c ppc32/Lstep.c + + +# The list of files that go into libunwind-ppc32: +libunwind_ppc32_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \ + $(libunwind_la_SOURCES_generic) \ + $(dwarf_SOURCES_generic) \ + $(libunwind_ppc_la_SOURCES_ppc_generic) \ + dwarf/Gfind_proc_info-lsb.c \ + ppc32/Gglobal.c ppc32/Ginit.c \ + ppc32/Gregs.c ppc32/Gresume.c ppc32/Gstep.c + + # The list of files that go both into libunwind and libunwind-ppc64: libunwind_la_SOURCES_ppc64_common = $(libunwind_la_SOURCES_common) \ $(dwarf_SOURCES_common) \ @@ -788,25 +869,20 @@ libunwind_la_SOURCES_ppc64_common = $(libunwind_la_SOURCES_common) \ libunwind_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \ $(libunwind_la_SOURCES_local) \ $(dwarf_SOURCES_local) \ + $(libunwind_la_SOURCES_ppc) \ dwarf/Lfind_proc_info-lsb.c \ - ppc64/Lcreate_addr_space.c ppc64/Lget_save_loc.c \ - ppc64/Lglobal.c ppc64/Linit.c ppc64/Linit_local.c \ - ppc64/Linit_remote.c ppc64/Lis_signal_frame.c \ - ppc64/Lget_proc_info.c ppc64/Lregs.c \ - ppc64/Lresume.c ppc64/Lstep.c + ppc64/Lglobal.c ppc64/Linit.c \ + ppc64/Lregs.c ppc64/Lresume.c ppc64/Lstep.c # The list of files that go into libunwind-ppc64: libunwind_ppc64_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \ $(libunwind_la_SOURCES_generic) \ $(dwarf_SOURCES_generic) \ + $(libunwind_ppc_la_SOURCES_ppc_generic) \ dwarf/Gfind_proc_info-lsb.c \ - ppc64/Gcreate_addr_space.c \ - ppc64/Gget_proc_info.c \ - ppc64/Gget_save_loc.c ppc64/Gglobal.c \ - ppc64/Ginit.c ppc64/Ginit_local.c ppc64/Ginit_remote.c \ - ppc64/Gis_signal_frame.c ppc64/Gregs.c ppc64/Gresume.c \ - ppc64/Gstep.c + ppc64/Gglobal.c ppc64/Ginit.c \ + ppc64/Gregs.c ppc64/Gresume.c ppc64/Gstep.c @OS_HPUX_TRUE@libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_hpux) @OS_LINUX_TRUE@libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_linux) @@ -815,12 +891,14 @@ libunwind_ppc64_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \ @ARCH_IA64_TRUE@ia64_mk_Gcursor_i_SOURCES = ia64/mk_Gcursor_i.c @ARCH_IA64_TRUE@ia64_mk_Lcursor_i_SOURCES = ia64/mk_Lcursor_i.c @ARCH_IA64_TRUE@BUILT_SOURCES = Gcursor_i.h Lcursor_i.h -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@lib_LTLIBRARIES_arch = libunwind-ppc64.la +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@lib_LTLIBRARIES_arch = libunwind-ppc64.la +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@lib_LTLIBRARIES_arch = libunwind-ppc32.la @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@lib_LTLIBRARIES_arch = libunwind-x86_64.la @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@lib_LTLIBRARIES_arch = libunwind-x86.la @ARCH_HPPA_TRUE@@ARCH_IA64_FALSE@lib_LTLIBRARIES_arch = libunwind-hppa.la @ARCH_IA64_TRUE@lib_LTLIBRARIES_arch = libunwind-ia64.la -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_la_SOURCES = $(libunwind_la_SOURCES_ppc64) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_la_SOURCES = $(libunwind_la_SOURCES_ppc64) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_la_SOURCES = $(libunwind_la_SOURCES_ppc32) @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@libunwind_la_SOURCES = $(libunwind_la_SOURCES_x86_64) @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_TRUE@libunwind_la_SOURCES = $(libunwind_la_SOURCES_x86) @ARCH_HPPA_TRUE@@ARCH_IA64_FALSE@libunwind_la_SOURCES = $(libunwind_la_SOURCES_hppa) @@ -828,8 +906,11 @@ libunwind_ppc64_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \ @ARCH_IA64_TRUE@libunwind_ia64_la_SOURCES = $(libunwind_ia64_la_SOURCES_ia64) @ARCH_IA64_TRUE@libunwind_ia64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) @ARCH_IA64_TRUE@@REMOTE_ONLY_FALSE@libunwind_ia64_la_LIBADD = libunwind.la -lc -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \ -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@ $(libunwind_setjmp_la_SOURCES_ppc64) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \ +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@ $(libunwind_setjmp_la_SOURCES_ppc64) + +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \ +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@ $(libunwind_setjmp_la_SOURCES_ppc32) @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \ @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@ $(libunwind_setjmp_la_SOURCES_x86_64) @@ -852,9 +933,12 @@ libunwind_ppc64_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \ @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@libunwind_x86_64_la_SOURCES = $(libunwind_x86_64_la_SOURCES_x86_64) @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@libunwind_x86_64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) @ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_X86_64_TRUE@@ARCH_X86_FALSE@@REMOTE_ONLY_FALSE@libunwind_x86_64_la_LIBADD = libunwind.la -lc -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_ppc64_la_SOURCES = $(libunwind_ppc64_la_SOURCES_ppc64) -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_ppc64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) -@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@@REMOTE_ONLY_FALSE@libunwind_ppc64_la_LIBADD = libunwind.la -lc +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_ppc32_la_SOURCES = $(libunwind_ppc32_la_SOURCES_ppc32) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_ppc32_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@@REMOTE_ONLY_FALSE@libunwind_ppc32_la_LIBADD = libunwind.la -lc +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_ppc64_la_SOURCES = $(libunwind_ppc64_la_SOURCES_ppc64) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@libunwind_ppc64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) +@ARCH_HPPA_FALSE@@ARCH_IA64_FALSE@@ARCH_PPC32_FALSE@@ARCH_PPC64_TRUE@@ARCH_X86_64_FALSE@@ARCH_X86_FALSE@@REMOTE_ONLY_FALSE@libunwind_ppc64_la_LIBADD = libunwind.la -lc # # Don't link with standard libraries, because those may mention @@ -889,6 +973,7 @@ EXTRA_DIST = elfxx.h elfxx.c unwind/unwind-internal.h \ $(libunwind_setjmp_la_SOURCES_ia64) \ $(libunwind_setjmp_la_SOURCES_x86) \ $(libunwind_setjmp_la_SOURCES_x86_64) \ + $(libunwind_setjmp_la_SOURCES_ppc32) \ $(libunwind_setjmp_la_SOURCES_ppc64) all: $(BUILT_SOURCES) @@ -1118,6 +1203,43 @@ ia64/Gstep.lo: ia64/$(am__dirstamp) ia64/$(DEPDIR)/$(am__dirstamp) ia64/Gtables.lo: ia64/$(am__dirstamp) ia64/$(DEPDIR)/$(am__dirstamp) libunwind-ia64.la: $(libunwind_ia64_la_OBJECTS) $(libunwind_ia64_la_DEPENDENCIES) $(LINK) $(am_libunwind_ia64_la_rpath) $(libunwind_ia64_la_LDFLAGS) $(libunwind_ia64_la_OBJECTS) $(libunwind_ia64_la_LIBADD) $(LIBS) +ppc32/$(am__dirstamp): + @$(mkdir_p) ppc32 + @: > ppc32/$(am__dirstamp) +ppc32/$(DEPDIR)/$(am__dirstamp): + @$(mkdir_p) ppc32/$(DEPDIR) + @: > ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/is_fpreg.lo: ppc32/$(am__dirstamp) \ + ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/regname.lo: ppc32/$(am__dirstamp) \ + ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/get_func_addr.lo: ppc32/$(am__dirstamp) \ + ppc32/$(DEPDIR)/$(am__dirstamp) +ppc/$(am__dirstamp): + @$(mkdir_p) ppc + @: > ppc/$(am__dirstamp) +ppc/$(DEPDIR)/$(am__dirstamp): + @$(mkdir_p) ppc/$(DEPDIR) + @: > ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Gcreate_addr_space.lo: ppc/$(am__dirstamp) \ + ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Gget_proc_info.lo: ppc/$(am__dirstamp) \ + ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Gget_save_loc.lo: ppc/$(am__dirstamp) \ + ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Ginit_local.lo: ppc/$(am__dirstamp) ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Ginit_remote.lo: ppc/$(am__dirstamp) ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Gis_signal_frame.lo: ppc/$(am__dirstamp) \ + ppc/$(DEPDIR)/$(am__dirstamp) +ppc32/Gglobal.lo: ppc32/$(am__dirstamp) \ + ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/Ginit.lo: ppc32/$(am__dirstamp) ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/Gregs.lo: ppc32/$(am__dirstamp) ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/Gresume.lo: ppc32/$(am__dirstamp) \ + ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/Gstep.lo: ppc32/$(am__dirstamp) ppc32/$(DEPDIR)/$(am__dirstamp) +libunwind-ppc32.la: $(libunwind_ppc32_la_OBJECTS) $(libunwind_ppc32_la_DEPENDENCIES) + $(LINK) $(am_libunwind_ppc32_la_rpath) $(libunwind_ppc32_la_LDFLAGS) $(libunwind_ppc32_la_OBJECTS) $(libunwind_ppc32_la_LIBADD) $(LIBS) ppc64/$(am__dirstamp): @$(mkdir_p) ppc64 @: > ppc64/$(am__dirstamp) @@ -1130,21 +1252,9 @@ ppc64/regname.lo: ppc64/$(am__dirstamp) \ ppc64/$(DEPDIR)/$(am__dirstamp) ppc64/get_func_addr.lo: ppc64/$(am__dirstamp) \ ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Gcreate_addr_space.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Gget_proc_info.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Gget_save_loc.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) ppc64/Gglobal.lo: ppc64/$(am__dirstamp) \ ppc64/$(DEPDIR)/$(am__dirstamp) ppc64/Ginit.lo: ppc64/$(am__dirstamp) ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Ginit_local.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Ginit_remote.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Gis_signal_frame.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) ppc64/Gregs.lo: ppc64/$(am__dirstamp) ppc64/$(DEPDIR)/$(am__dirstamp) ppc64/Gresume.lo: ppc64/$(am__dirstamp) \ ppc64/$(DEPDIR)/$(am__dirstamp) @@ -1161,10 +1271,8 @@ setjmp/longjmp.lo: setjmp/$(am__dirstamp) \ setjmp/$(DEPDIR)/$(am__dirstamp) setjmp/siglongjmp.lo: setjmp/$(am__dirstamp) \ setjmp/$(DEPDIR)/$(am__dirstamp) -ppc64/longjmp.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/siglongjmp.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) +ppc/longjmp.lo: ppc/$(am__dirstamp) ppc/$(DEPDIR)/$(am__dirstamp) +ppc/siglongjmp.lo: ppc/$(am__dirstamp) ppc/$(DEPDIR)/$(am__dirstamp) x86_64/$(am__dirstamp): @$(mkdir_p) x86_64 @: > x86_64/$(am__dirstamp) @@ -1308,27 +1416,32 @@ dwarf/Lparser.lo: dwarf/$(am__dirstamp) \ dwarf/$(DEPDIR)/$(am__dirstamp) dwarf/Lpe.lo: dwarf/$(am__dirstamp) dwarf/$(DEPDIR)/$(am__dirstamp) dwarf/Lstep.lo: dwarf/$(am__dirstamp) dwarf/$(DEPDIR)/$(am__dirstamp) +ppc/Lcreate_addr_space.lo: ppc/$(am__dirstamp) \ + ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Lget_proc_info.lo: ppc/$(am__dirstamp) \ + ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Lget_save_loc.lo: ppc/$(am__dirstamp) \ + ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Linit_local.lo: ppc/$(am__dirstamp) ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Linit_remote.lo: ppc/$(am__dirstamp) ppc/$(DEPDIR)/$(am__dirstamp) +ppc/Lis_signal_frame.lo: ppc/$(am__dirstamp) \ + ppc/$(DEPDIR)/$(am__dirstamp) dwarf/Lfind_proc_info-lsb.lo: dwarf/$(am__dirstamp) \ dwarf/$(DEPDIR)/$(am__dirstamp) -ppc64/Lcreate_addr_space.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Lget_save_loc.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) ppc64/Lglobal.lo: ppc64/$(am__dirstamp) \ ppc64/$(DEPDIR)/$(am__dirstamp) ppc64/Linit.lo: ppc64/$(am__dirstamp) ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Linit_local.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Linit_remote.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Lis_signal_frame.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) -ppc64/Lget_proc_info.lo: ppc64/$(am__dirstamp) \ - ppc64/$(DEPDIR)/$(am__dirstamp) ppc64/Lregs.lo: ppc64/$(am__dirstamp) ppc64/$(DEPDIR)/$(am__dirstamp) ppc64/Lresume.lo: ppc64/$(am__dirstamp) \ ppc64/$(DEPDIR)/$(am__dirstamp) ppc64/Lstep.lo: ppc64/$(am__dirstamp) ppc64/$(DEPDIR)/$(am__dirstamp) +ppc32/Lglobal.lo: ppc32/$(am__dirstamp) \ + ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/Linit.lo: ppc32/$(am__dirstamp) ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/Lregs.lo: ppc32/$(am__dirstamp) ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/Lresume.lo: ppc32/$(am__dirstamp) \ + ppc32/$(DEPDIR)/$(am__dirstamp) +ppc32/Lstep.lo: ppc32/$(am__dirstamp) ppc32/$(DEPDIR)/$(am__dirstamp) x86_64/setcontext.lo: x86_64/$(am__dirstamp) \ x86_64/$(DEPDIR)/$(am__dirstamp) x86_64/Lcreate_addr_space.lo: x86_64/$(am__dirstamp) \ @@ -1666,44 +1779,74 @@ mostlyclean-compile: -rm -f mi/mempool.lo -rm -f mi/strerror.$(OBJEXT) -rm -f mi/strerror.lo - -rm -f ppc64/Gcreate_addr_space.$(OBJEXT) - -rm -f ppc64/Gcreate_addr_space.lo - -rm -f ppc64/Gget_proc_info.$(OBJEXT) - -rm -f ppc64/Gget_proc_info.lo - -rm -f ppc64/Gget_save_loc.$(OBJEXT) - -rm -f ppc64/Gget_save_loc.lo + -rm -f ppc/Gcreate_addr_space.$(OBJEXT) + -rm -f ppc/Gcreate_addr_space.lo + -rm -f ppc/Gget_proc_info.$(OBJEXT) + -rm -f ppc/Gget_proc_info.lo + -rm -f ppc/Gget_save_loc.$(OBJEXT) + -rm -f ppc/Gget_save_loc.lo + -rm -f ppc/Ginit_local.$(OBJEXT) + -rm -f ppc/Ginit_local.lo + -rm -f ppc/Ginit_remote.$(OBJEXT) + -rm -f ppc/Ginit_remote.lo + -rm -f ppc/Gis_signal_frame.$(OBJEXT) + -rm -f ppc/Gis_signal_frame.lo + -rm -f ppc/Lcreate_addr_space.$(OBJEXT) + -rm -f ppc/Lcreate_addr_space.lo + -rm -f ppc/Lget_proc_info.$(OBJEXT) + -rm -f ppc/Lget_proc_info.lo + -rm -f ppc/Lget_save_loc.$(OBJEXT) + -rm -f ppc/Lget_save_loc.lo + -rm -f ppc/Linit_local.$(OBJEXT) + -rm -f ppc/Linit_local.lo + -rm -f ppc/Linit_remote.$(OBJEXT) + -rm -f ppc/Linit_remote.lo + -rm -f ppc/Lis_signal_frame.$(OBJEXT) + -rm -f ppc/Lis_signal_frame.lo + -rm -f ppc/longjmp.$(OBJEXT) + -rm -f ppc/longjmp.lo + -rm -f ppc/siglongjmp.$(OBJEXT) + -rm -f ppc/siglongjmp.lo + -rm -f ppc32/Gglobal.$(OBJEXT) + -rm -f ppc32/Gglobal.lo + -rm -f ppc32/Ginit.$(OBJEXT) + -rm -f ppc32/Ginit.lo + -rm -f ppc32/Gregs.$(OBJEXT) + -rm -f ppc32/Gregs.lo + -rm -f ppc32/Gresume.$(OBJEXT) + -rm -f ppc32/Gresume.lo + -rm -f ppc32/Gstep.$(OBJEXT) + -rm -f ppc32/Gstep.lo + -rm -f ppc32/Lglobal.$(OBJEXT) + -rm -f ppc32/Lglobal.lo + -rm -f ppc32/Linit.$(OBJEXT) + -rm -f ppc32/Linit.lo + -rm -f ppc32/Lregs.$(OBJEXT) + -rm -f ppc32/Lregs.lo + -rm -f ppc32/Lresume.$(OBJEXT) + -rm -f ppc32/Lresume.lo + -rm -f ppc32/Lstep.$(OBJEXT) + -rm -f ppc32/Lstep.lo + -rm -f ppc32/get_func_addr.$(OBJEXT) + -rm -f ppc32/get_func_addr.lo + -rm -f ppc32/is_fpreg.$(OBJEXT) + -rm -f ppc32/is_fpreg.lo + -rm -f ppc32/regname.$(OBJEXT) + -rm -f ppc32/regname.lo -rm -f ppc64/Gglobal.$(OBJEXT) -rm -f ppc64/Gglobal.lo -rm -f ppc64/Ginit.$(OBJEXT) -rm -f ppc64/Ginit.lo - -rm -f ppc64/Ginit_local.$(OBJEXT) - -rm -f ppc64/Ginit_local.lo - -rm -f ppc64/Ginit_remote.$(OBJEXT) - -rm -f ppc64/Ginit_remote.lo - -rm -f ppc64/Gis_signal_frame.$(OBJEXT) - -rm -f ppc64/Gis_signal_frame.lo -rm -f ppc64/Gregs.$(OBJEXT) -rm -f ppc64/Gregs.lo -rm -f ppc64/Gresume.$(OBJEXT) -rm -f ppc64/Gresume.lo -rm -f ppc64/Gstep.$(OBJEXT) -rm -f ppc64/Gstep.lo - -rm -f ppc64/Lcreate_addr_space.$(OBJEXT) - -rm -f ppc64/Lcreate_addr_space.lo - -rm -f ppc64/Lget_proc_info.$(OBJEXT) - -rm -f ppc64/Lget_proc_info.lo - -rm -f ppc64/Lget_save_loc.$(OBJEXT) - -rm -f ppc64/Lget_save_loc.lo -rm -f ppc64/Lglobal.$(OBJEXT) -rm -f ppc64/Lglobal.lo -rm -f ppc64/Linit.$(OBJEXT) -rm -f ppc64/Linit.lo - -rm -f ppc64/Linit_local.$(OBJEXT) - -rm -f ppc64/Linit_local.lo - -rm -f ppc64/Linit_remote.$(OBJEXT) - -rm -f ppc64/Linit_remote.lo - -rm -f ppc64/Lis_signal_frame.$(OBJEXT) - -rm -f ppc64/Lis_signal_frame.lo -rm -f ppc64/Lregs.$(OBJEXT) -rm -f ppc64/Lregs.lo -rm -f ppc64/Lresume.$(OBJEXT) @@ -1714,12 +1857,8 @@ mostlyclean-compile: -rm -f ppc64/get_func_addr.lo -rm -f ppc64/is_fpreg.$(OBJEXT) -rm -f ppc64/is_fpreg.lo - -rm -f ppc64/longjmp.$(OBJEXT) - -rm -f ppc64/longjmp.lo -rm -f ppc64/regname.$(OBJEXT) -rm -f ppc64/regname.lo - -rm -f ppc64/siglongjmp.$(OBJEXT) - -rm -f ppc64/siglongjmp.lo -rm -f ptrace/_UPT_access_fpreg.$(OBJEXT) -rm -f ptrace/_UPT_access_mem.$(OBJEXT) -rm -f ptrace/_UPT_access_reg.$(OBJEXT) @@ -1989,25 +2128,38 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@mi/$(DEPDIR)/init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mi/$(DEPDIR)/mempool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mi/$(DEPDIR)/strerror.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Gcreate_addr_space.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Gget_proc_info.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Gget_save_loc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Gcreate_addr_space.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Gget_proc_info.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Gget_save_loc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Ginit_local.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Ginit_remote.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Gis_signal_frame.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Lcreate_addr_space.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Lget_proc_info.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Lget_save_loc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Linit_local.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Linit_remote.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc/$(DEPDIR)/Lis_signal_frame.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/Gglobal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/Ginit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/Gregs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/Gresume.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/Gstep.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/Lglobal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/Linit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/Lregs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/Lresume.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/Lstep.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/get_func_addr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/is_fpreg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ppc32/$(DEPDIR)/regname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Gglobal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Ginit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Ginit_local.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Ginit_remote.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Gis_signal_frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Gregs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Gresume.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Gstep.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Lcreate_addr_space.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Lget_proc_info.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Lget_save_loc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Lglobal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Linit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Linit_local.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Linit_remote.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Lis_signal_frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Lregs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Lresume.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ppc64/$(DEPDIR)/Lstep.Plo@am__quote@ @@ -2137,6 +2289,8 @@ clean-libtool: -rm -rf hppa/.libs hppa/_libs -rm -rf ia64/.libs ia64/_libs -rm -rf mi/.libs mi/_libs + -rm -rf ppc/.libs ppc/_libs + -rm -rf ppc32/.libs ppc32/_libs -rm -rf ppc64/.libs ppc64/_libs -rm -rf setjmp/.libs setjmp/_libs -rm -rf unwind/.libs unwind/_libs @@ -2196,7 +2350,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/dwarf $(distdir)/hppa $(distdir)/ia64 $(distdir)/mi $(distdir)/ppc64 $(distdir)/ptrace $(distdir)/setjmp $(distdir)/unwind $(distdir)/x86 $(distdir)/x86_64 + $(mkdir_p) $(distdir)/dwarf $(distdir)/hppa $(distdir)/ia64 $(distdir)/mi $(distdir)/ppc $(distdir)/ptrace $(distdir)/setjmp $(distdir)/unwind $(distdir)/x86 $(distdir)/x86_64 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -2260,6 +2414,10 @@ distclean-generic: -rm -f ia64/$(am__dirstamp) -rm -f mi/$(DEPDIR)/$(am__dirstamp) -rm -f mi/$(am__dirstamp) + -rm -f ppc/$(DEPDIR)/$(am__dirstamp) + -rm -f ppc/$(am__dirstamp) + -rm -f ppc32/$(DEPDIR)/$(am__dirstamp) + -rm -f ppc32/$(am__dirstamp) -rm -f ppc64/$(DEPDIR)/$(am__dirstamp) -rm -f ppc64/$(am__dirstamp) -rm -f ptrace/$(DEPDIR)/$(am__dirstamp) @@ -2283,7 +2441,7 @@ clean-am: clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \ clean-libtool clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) dwarf/$(DEPDIR) hppa/$(DEPDIR) ia64/$(DEPDIR) mi/$(DEPDIR) ppc64/$(DEPDIR) ptrace/$(DEPDIR) setjmp/$(DEPDIR) unwind/$(DEPDIR) x86/$(DEPDIR) x86_64/$(DEPDIR) + -rm -rf ./$(DEPDIR) dwarf/$(DEPDIR) hppa/$(DEPDIR) ia64/$(DEPDIR) mi/$(DEPDIR) ppc/$(DEPDIR) ppc32/$(DEPDIR) ppc64/$(DEPDIR) ptrace/$(DEPDIR) setjmp/$(DEPDIR) unwind/$(DEPDIR) x86/$(DEPDIR) x86_64/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags @@ -2311,7 +2469,7 @@ install-man: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) dwarf/$(DEPDIR) hppa/$(DEPDIR) ia64/$(DEPDIR) mi/$(DEPDIR) ppc64/$(DEPDIR) ptrace/$(DEPDIR) setjmp/$(DEPDIR) unwind/$(DEPDIR) x86/$(DEPDIR) x86_64/$(DEPDIR) + -rm -rf ./$(DEPDIR) dwarf/$(DEPDIR) hppa/$(DEPDIR) ia64/$(DEPDIR) mi/$(DEPDIR) ppc/$(DEPDIR) ppc32/$(DEPDIR) ppc64/$(DEPDIR) ptrace/$(DEPDIR) setjmp/$(DEPDIR) unwind/$(DEPDIR) x86/$(DEPDIR) x86_64/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/src/ppc64/Gcreate_addr_space.c b/src/ppc/Gcreate_addr_space.c index f67c78fd..21ec10fc 100644 --- a/src/ppc64/Gcreate_addr_space.c +++ b/src/ppc/Gcreate_addr_space.c @@ -27,7 +27,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <stdlib.h> -#include "unwind_i.h" +#include <libunwind_i.h> PROTECTED unw_addr_space_t unw_create_addr_space (unw_accessors_t *a, int byte_order) diff --git a/src/ppc64/Gget_proc_info.c b/src/ppc/Gget_proc_info.c index 9bd9af6c..21be70c4 100644 --- a/src/ppc64/Gget_proc_info.c +++ b/src/ppc/Gget_proc_info.c @@ -24,7 +24,7 @@ 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 "unwind_i.h" +#include <libunwind_i.h> PROTECTED int unw_get_proc_info (unw_cursor_t *cursor, unw_proc_info_t *pi) diff --git a/src/ppc64/Gget_save_loc.c b/src/ppc/Gget_save_loc.c index 56d29054..c5beb81d 100644 --- a/src/ppc64/Gget_save_loc.c +++ b/src/ppc/Gget_save_loc.c @@ -24,7 +24,7 @@ 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 "unwind_i.h" +#include <libunwind_i.h> PROTECTED int unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc) diff --git a/src/ppc64/Ginit_local.c b/src/ppc/Ginit_local.c index 87cd74d3..2d9ab2ce 100644 --- a/src/ppc64/Ginit_local.c +++ b/src/ppc/Ginit_local.c @@ -24,8 +24,13 @@ 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 "unwind_i.h" -#include "init.h" +#include <libunwind_i.h> + +#ifdef UNW_TARGET_PPC64 +#include "../ppc64/init.h" +#else +#include "../ppc32/init.h" +#endif #ifdef UNW_REMOTE_ONLY @@ -50,7 +55,11 @@ unw_init_local (unw_cursor_t *cursor, ucontext_t *uc) c->dwarf.as = unw_local_addr_space; c->dwarf.as_arg = uc; - return common_init (c); + #ifdef UNW_TARGET_PPC64 + return common_init_ppc64 (c); + #else + return common_init_ppc32 (c); + #endif } #endif /* !UNW_REMOTE_ONLY */ diff --git a/src/ppc64/Ginit_remote.c b/src/ppc/Ginit_remote.c index dc98130e..66269d2c 100644 --- a/src/ppc64/Ginit_remote.c +++ b/src/ppc/Ginit_remote.c @@ -25,8 +25,13 @@ 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 "init.h" -#include "unwind_i.h" +#include <libunwind_i.h> + +#ifdef UNW_TARGET_PPC64 +#include "../ppc64/init.h" +#else +#include "../ppc32/init.h" +#endif PROTECTED int unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg) @@ -43,6 +48,13 @@ unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg) c->dwarf.as = as; c->dwarf.as_arg = as_arg; - return common_init (c); + + #ifdef UNW_TARGET_PPC64 + return common_init_ppc64(c); + #elif UNW_TARGET_PPC32 + return common_init_ppc32 (c); + #else + #error init_remote :: NO VALID PPC ARCH! + #endif #endif /* !UNW_LOCAL_ONLY */ } diff --git a/src/ppc64/Gis_signal_frame.c b/src/ppc/Gis_signal_frame.c index 2fff7e4b..41544290 100644 --- a/src/ppc64/Gis_signal_frame.c +++ b/src/ppc/Gis_signal_frame.c @@ -25,7 +25,7 @@ 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 "unwind_i.h" +#include <libunwind_i.h> PROTECTED int unw_is_signal_frame (unw_cursor_t * cursor) diff --git a/src/ppc64/Lcreate_addr_space.c b/src/ppc/Lcreate_addr_space.c index 0f2dc6be..0f2dc6be 100644 --- a/src/ppc64/Lcreate_addr_space.c +++ b/src/ppc/Lcreate_addr_space.c diff --git a/src/ppc64/Lget_proc_info.c b/src/ppc/Lget_proc_info.c index 69028b01..69028b01 100644 --- a/src/ppc64/Lget_proc_info.c +++ b/src/ppc/Lget_proc_info.c diff --git a/src/ppc64/Lget_save_loc.c b/src/ppc/Lget_save_loc.c index 9ea048a9..9ea048a9 100644 --- a/src/ppc64/Lget_save_loc.c +++ b/src/ppc/Lget_save_loc.c diff --git a/src/ppc64/Linit_local.c b/src/ppc/Linit_local.c index 68a1687e..68a1687e 100644 --- a/src/ppc64/Linit_local.c +++ b/src/ppc/Linit_local.c diff --git a/src/ppc64/Linit_remote.c b/src/ppc/Linit_remote.c index 58cb04ab..58cb04ab 100644 --- a/src/ppc64/Linit_remote.c +++ b/src/ppc/Linit_remote.c diff --git a/src/ppc64/Lis_signal_frame.c b/src/ppc/Lis_signal_frame.c index b9a7c4f5..b9a7c4f5 100644 --- a/src/ppc64/Lis_signal_frame.c +++ b/src/ppc/Lis_signal_frame.c diff --git a/src/ppc64/longjmp.S b/src/ppc/longjmp.S index 36bc1af0..36bc1af0 100644 --- a/src/ppc64/longjmp.S +++ b/src/ppc/longjmp.S diff --git a/src/ppc64/siglongjmp.S b/src/ppc/siglongjmp.S index 86726968..86726968 100644 --- a/src/ppc64/siglongjmp.S +++ b/src/ppc/siglongjmp.S diff --git a/src/ppc32/Gglobal.c b/src/ppc32/Gglobal.c new file mode 100644 index 00000000..44be8bc4 --- /dev/null +++ b/src/ppc32/Gglobal.c @@ -0,0 +1,150 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford <cjashfor@us.ibm.com> + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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 "unwind_i.h" +#include "dwarf_i.h" + +HIDDEN pthread_mutex_t ppc32_lock = PTHREAD_MUTEX_INITIALIZER; +HIDDEN int tdep_needs_initialization = 1; + +/* The API register numbers are exactly the same as the .eh_frame + registers, for now at least. */ +uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH] = + { + [UNW_PPC32_R0]=UNW_PPC32_R0, + [UNW_PPC32_R1]=UNW_PPC32_R1, + [UNW_PPC32_R2]=UNW_PPC32_R2, + [UNW_PPC32_R3]=UNW_PPC32_R3, + [UNW_PPC32_R4]=UNW_PPC32_R4, + [UNW_PPC32_R5]=UNW_PPC32_R5, + [UNW_PPC32_R6]=UNW_PPC32_R6, + [UNW_PPC32_R7]=UNW_PPC32_R7, + [UNW_PPC32_R8]=UNW_PPC32_R8, + [UNW_PPC32_R9]=UNW_PPC32_R9, + [UNW_PPC32_R10]=UNW_PPC32_R10, + [UNW_PPC32_R11]=UNW_PPC32_R11, + [UNW_PPC32_R12]=UNW_PPC32_R12, + [UNW_PPC32_R13]=UNW_PPC32_R13, + [UNW_PPC32_R14]=UNW_PPC32_R14, + [UNW_PPC32_R15]=UNW_PPC32_R15, + [UNW_PPC32_R16]=UNW_PPC32_R16, + [UNW_PPC32_R17]=UNW_PPC32_R17, + [UNW_PPC32_R18]=UNW_PPC32_R18, + [UNW_PPC32_R19]=UNW_PPC32_R19, + [UNW_PPC32_R20]=UNW_PPC32_R20, + [UNW_PPC32_R21]=UNW_PPC32_R21, + [UNW_PPC32_R22]=UNW_PPC32_R22, + [UNW_PPC32_R23]=UNW_PPC32_R23, + [UNW_PPC32_R24]=UNW_PPC32_R24, + [UNW_PPC32_R25]=UNW_PPC32_R25, + [UNW_PPC32_R26]=UNW_PPC32_R26, + [UNW_PPC32_R27]=UNW_PPC32_R27, + [UNW_PPC32_R28]=UNW_PPC32_R28, + [UNW_PPC32_R29]=UNW_PPC32_R29, + [UNW_PPC32_R30]=UNW_PPC32_R30, + [UNW_PPC32_R31]=UNW_PPC32_R31, + + [UNW_PPC32_F0]=UNW_PPC32_F0, + [UNW_PPC32_F1]=UNW_PPC32_F1, + [UNW_PPC32_F2]=UNW_PPC32_F2, + [UNW_PPC32_F3]=UNW_PPC32_F3, + [UNW_PPC32_F4]=UNW_PPC32_F4, + [UNW_PPC32_F5]=UNW_PPC32_F5, + [UNW_PPC32_F6]=UNW_PPC32_F6, + [UNW_PPC32_F7]=UNW_PPC32_F7, + [UNW_PPC32_F8]=UNW_PPC32_F8, + [UNW_PPC32_F9]=UNW_PPC32_F9, + [UNW_PPC32_F10]=UNW_PPC32_F10, + [UNW_PPC32_F11]=UNW_PPC32_F11, + [UNW_PPC32_F12]=UNW_PPC32_F12, + [UNW_PPC32_F13]=UNW_PPC32_F13, + [UNW_PPC32_F14]=UNW_PPC32_F14, + [UNW_PPC32_F15]=UNW_PPC32_F15, + [UNW_PPC32_F16]=UNW_PPC32_F16, + [UNW_PPC32_F17]=UNW_PPC32_F17, + [UNW_PPC32_F18]=UNW_PPC32_F18, + [UNW_PPC32_F19]=UNW_PPC32_F19, + [UNW_PPC32_F20]=UNW_PPC32_F20, + [UNW_PPC32_F21]=UNW_PPC32_F21, + [UNW_PPC32_F22]=UNW_PPC32_F22, + [UNW_PPC32_F23]=UNW_PPC32_F23, + [UNW_PPC32_F24]=UNW_PPC32_F24, + [UNW_PPC32_F25]=UNW_PPC32_F25, + [UNW_PPC32_F26]=UNW_PPC32_F26, + [UNW_PPC32_F27]=UNW_PPC32_F27, + [UNW_PPC32_F28]=UNW_PPC32_F28, + [UNW_PPC32_F29]=UNW_PPC32_F29, + [UNW_PPC32_F30]=UNW_PPC32_F30, + [UNW_PPC32_F31]=UNW_PPC32_F31, + + [UNW_PPC32_LR]=UNW_PPC32_LR, + [UNW_PPC32_CTR]=UNW_PPC32_CTR, + [UNW_PPC32_ARG_POINTER]=UNW_PPC32_ARG_POINTER, + + [UNW_PPC32_CR0]=UNW_PPC32_CR0, + [UNW_PPC32_CR1]=UNW_PPC32_CR1, + [UNW_PPC32_CR2]=UNW_PPC32_CR2, + [UNW_PPC32_CR3]=UNW_PPC32_CR3, + [UNW_PPC32_CR4]=UNW_PPC32_CR4, + [UNW_PPC32_CR5]=UNW_PPC32_CR5, + [UNW_PPC32_CR6]=UNW_PPC32_CR6, + [UNW_PPC32_CR7]=UNW_PPC32_CR7, + + [UNW_PPC32_XER]=UNW_PPC32_XER, + [UNW_PPC32_VRSAVE]=UNW_PPC32_VRSAVE, + [UNW_PPC32_VSCR]=UNW_PPC32_VSCR, + [UNW_PPC32_SPE_ACC]=UNW_PPC32_SPE_ACC, + [UNW_PPC32_SPEFSCR]=UNW_PPC32_SPEFSCR, + }; + +HIDDEN void +tdep_init (void) +{ + intrmask_t saved_mask; + + sigfillset (&unwi_full_mask); + + sigprocmask (SIG_SETMASK, &unwi_full_mask, &saved_mask); + mutex_lock (&ppc32_lock); + { + if (!tdep_needs_initialization) + /* another thread else beat us to it... */ + goto out; + + mi_init (); + + dwarf_init (); + +#ifndef UNW_REMOTE_ONLY + ppc32_local_addr_space_init (); +#endif + tdep_needs_initialization = 0; /* signal that we're initialized... */ + } + out: + mutex_unlock (&ppc32_lock); + sigprocmask (SIG_SETMASK, &saved_mask, NULL); +} diff --git a/src/ppc32/Ginit.c b/src/ppc32/Ginit.c new file mode 100644 index 00000000..00d97a2f --- /dev/null +++ b/src/ppc32/Ginit.c @@ -0,0 +1,221 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford <cjashfor@us.ibm.com> + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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 <stdlib.h> +#include <string.h> + +#include "ucontext_i.h" +#include "unwind_i.h" + +#ifdef UNW_REMOTE_ONLY + +/* unw_local_addr_space is a NULL pointer in this case. */ +PROTECTED unw_addr_space_t unw_local_addr_space; + +#else /* !UNW_REMOTE_ONLY */ + +static struct unw_addr_space local_addr_space; + +PROTECTED unw_addr_space_t unw_local_addr_space = &local_addr_space; + + +#define PAGE_SIZE 4096 +#define PAGE_START(a) ((a) & ~(PAGE_SIZE-1)) + + +static void * +uc_addr (ucontext_t *uc, int reg) +{ + void *addr; + + if ((unsigned) (reg - UNW_PPC32_R0) < 32) + addr = &uc->uc_mcontext.uc_regs->gregs[reg - UNW_PPC32_R0]; + + else if ((unsigned) (reg - UNW_PPC32_F0) < 32) + addr = &uc->uc_mcontext.uc_regs->fpregs.fpregs[reg - UNW_PPC32_F0]; + + else + { + unsigned gregs_idx; + + switch (reg) + { + case UNW_PPC32_NIP: + gregs_idx = NIP_IDX; + break; + case UNW_PPC32_CTR: + gregs_idx = CTR_IDX; + break; + case UNW_PPC32_LR: + gregs_idx = LINK_IDX; + break; + case UNW_PPC32_XER: + gregs_idx = XER_IDX; + break; + case UNW_PPC32_CR0: + gregs_idx = CCR_IDX; + break; + default: + return NULL; + } + addr = &uc->uc_mcontext.uc_regs->gregs[gregs_idx]; + } + return addr; +} + +# ifdef UNW_LOCAL_ONLY + +HIDDEN void * +tdep_uc_addr (ucontext_t *uc, int reg) +{ + return uc_addr (uc, reg); +} + +# endif /* UNW_LOCAL_ONLY */ + +HIDDEN unw_dyn_info_list_t _U_dyn_info_list; + + +static void +put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) +{ + /* it's a no-op */ +} + +static int +get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, + void *arg) +{ + *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; + return 0; +} + +static int +access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write, + void *arg) +{ + if (write) + { + Debug (12, "mem[%lx] <- %lx\n", addr, *val); + *(unw_word_t *) addr = *val; + } + else + { + *val = *(unw_word_t *) addr; + Debug (12, "mem[%lx] -> %lx\n", addr, *val); + } + return 0; +} + +static int +access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, + int write, void *arg) +{ + unw_word_t *addr; + ucontext_t *uc = arg; + + if ((unsigned int) (reg - UNW_PPC32_F0) < 32) + goto badreg; + + addr = uc_addr (uc, reg); + if (!addr) + goto badreg; + + if (write) + { + *(unw_word_t *) addr = *val; + Debug (12, "%s <- %lx\n", unw_regname (reg), *val); + } + else + { + *val = *(unw_word_t *) addr; + Debug (12, "%s -> %lx\n", unw_regname (reg), *val); + } + return 0; + +badreg: + Debug (1, "bad register number %u\n", reg); + return -UNW_EBADREG; +} + +static int +access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val, + int write, void *arg) +{ + ucontext_t *uc = arg; + unw_fpreg_t *addr; + + if ((unsigned) (reg - UNW_PPC32_F0) < 0) + goto badreg; + + addr = uc_addr (uc, reg); + if (!addr) + goto badreg; + + if (write) + { + Debug (12, "%s <- %016Lf\n", unw_regname (reg), *val); + *(unw_fpreg_t *) addr = *val; + } + else + { + *val = *(unw_fpreg_t *) addr; + Debug (12, "%s -> %016Lf\n", unw_regname (reg), *val); + } + return 0; + +badreg: + Debug (1, "bad register number %u\n", reg); + /* attempt to access a non-preserved register */ + return -UNW_EBADREG; +} + +static int +get_static_proc_name (unw_addr_space_t as, unw_word_t ip, + char *buf, size_t buf_len, unw_word_t *offp, + void *arg) +{ + return _Uelf32_get_proc_name (as, getpid (), ip, buf, buf_len, offp); +} + +HIDDEN void +ppc32_local_addr_space_init (void) +{ + memset (&local_addr_space, 0, sizeof (local_addr_space)); + local_addr_space.caching_policy = UNW_CACHE_GLOBAL; + local_addr_space.acc.find_proc_info = dwarf_find_proc_info; + local_addr_space.acc.put_unwind_info = put_unwind_info; + local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr; + local_addr_space.acc.access_mem = access_mem; + local_addr_space.acc.access_reg = access_reg; + local_addr_space.acc.access_fpreg = access_fpreg; + local_addr_space.acc.resume = ppc32_local_resume; + local_addr_space.acc.get_proc_name = get_static_proc_name; + unw_flush_cache (&local_addr_space, 0, 0); +} + +#endif /* !UNW_REMOTE_ONLY */ diff --git a/src/ppc32/Gregs.c b/src/ppc32/Gregs.c new file mode 100644 index 00000000..92be3216 --- /dev/null +++ b/src/ppc32/Gregs.c @@ -0,0 +1,90 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford <cjashfor@us.ibm.com> + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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 "unwind_i.h" + +HIDDEN int +tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp, + int write) +{ + struct dwarf_loc loc; + + switch (reg) + { + case UNW_TDEP_IP: + if (write) + { + c->dwarf.ip = *valp; /* update the IP cache */ + if (c->dwarf.pi_valid && (*valp < c->dwarf.pi.start_ip + || *valp >= c->dwarf.pi.end_ip)) + c->dwarf.pi_valid = 0; /* new IP outside of current proc */ + } + else + *valp = c->dwarf.ip; + return 0; + + case UNW_TDEP_SP: + if (write) + return -UNW_EREADONLYREG; + *valp = c->dwarf.cfa; + return 0; + + + default: + break; + } + + /* make sure it's not an FP or VR register */ + if ((((unsigned) (reg - UNW_PPC32_F0)) <= 31)) + return -UNW_EBADREG; + + loc = c->dwarf.loc[reg]; + + if (write) + return dwarf_put (&c->dwarf, loc, *valp); + else + return dwarf_get (&c->dwarf, loc, valp); +} + +HIDDEN int +tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, unw_fpreg_t *valp, + int write) +{ + struct dwarf_loc loc; + + if ((unsigned) (reg - UNW_PPC32_F0) < 32) + { + loc = c->dwarf.loc[reg]; + if (write) + return dwarf_putfp (&c->dwarf, loc, *valp); + else + return dwarf_getfp (&c->dwarf, loc, valp); + } + + return -UNW_EBADREG; +} + diff --git a/src/ppc32/Gresume.c b/src/ppc32/Gresume.c new file mode 100644 index 00000000..5446c980 --- /dev/null +++ b/src/ppc32/Gresume.c @@ -0,0 +1,77 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford cjashfor@us.ibm.com + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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 <stdlib.h> + +#include "unwind_i.h" + +#ifndef UNW_REMOTE_ONLY + +#include <sys/syscall.h> + +/* sigreturn() is a no-op on x86_64 glibc. */ + +static NORETURN inline long +my_rt_sigreturn (void *new_sp) +{ + /* XXX: empty stub. */ + abort (); +} + +HIDDEN inline int +ppc32_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) +{ + /* XXX: empty stub. */ + return -UNW_EINVAL; +} + +#endif /* !UNW_REMOTE_ONLY */ + +/* This routine is responsible for copying the register values in + cursor C and establishing them as the current machine state. */ + +static inline int +establish_machine_state (struct cursor *c) +{ + /* XXX: empty stub. */ + return 0; +} + +PROTECTED int +unw_resume (unw_cursor_t *cursor) +{ + struct cursor *c = (struct cursor *) cursor; + int ret; + + Debug (1, "(cursor=%p)\n", c); + + if ((ret = establish_machine_state (c)) < 0) + return ret; + + return (*c->dwarf.as->acc.resume) (c->dwarf.as, (unw_cursor_t *) c, + c->dwarf.as_arg); +} diff --git a/src/ppc32/Gstep.c b/src/ppc32/Gstep.c new file mode 100644 index 00000000..a5afe0ab --- /dev/null +++ b/src/ppc32/Gstep.c @@ -0,0 +1,317 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford <cjashfor@us.ibm.com> + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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 "unwind_i.h" +#include "ucontext_i.h" +#include <signal.h> + +/* This definition originates in /usr/include/asm-ppc64/ptrace.h, but is + defined there only when __KERNEL__ is defined. We reproduce it here for + our use at the user level in order to locate the ucontext record, which + appears to be at this offset relative to the stack pointer when in the + context of the signal handler return trampoline code - + __kernel_sigtramp_rt64. */ +#define __SIGNAL_FRAMESIZE 128 + +/* This definition comes from the document "64-bit PowerPC ELF Application + Binary Interface Supplement 1.9", section 3.2.2. + http://www.linux-foundation.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html#STACK */ + +typedef struct +{ + long unsigned back_chain; + long unsigned cr_save; + long unsigned lr_save; + /* many more fields here, but they are unused by this code */ +} stack_frame_t; + + +PROTECTED int +unw_step (unw_cursor_t * cursor) +{ + struct cursor *c = (struct cursor *) cursor; + stack_frame_t dummy; + unw_word_t back_chain_offset, lr_save_offset, v_regs_ptr; + struct dwarf_loc back_chain_loc, lr_save_loc, sp_loc, ip_loc, v_regs_loc; + int ret; + + Debug (1, "(cursor=%p, ip=0x%016lx)\n", c, (unsigned long) c->dwarf.ip); + + if (c->dwarf.ip == 0) + { + /* Unless the cursor or stack is corrupt or uninitialized, + we've most likely hit the top of the stack */ + return 0; + } + + /* Try DWARF-based unwinding... */ + + ret = dwarf_step (&c->dwarf); + + if (ret < 0 && ret != -UNW_ENOINFO) + { + Debug (2, "returning %d\n", ret); + return ret; + } + + if (unlikely (ret < 0)) + { + if (likely (!unw_is_signal_frame (cursor))) + { + /* DWARF unwinding failed. As of 09/26/2006, gcc in 64-bit mode + produces the mandatory level of traceback record in the code, but + I get the impression that this is transitory, that eventually gcc + will not produce any traceback records at all. So, for now, we + won't bother to try to find and use these records. + + We can, however, attempt to unwind the frame by using the callback + chain. This is very crude, however, and won't be able to unwind + any registers besides the IP, SP, and LR . */ + + back_chain_offset = ((void *) &dummy.back_chain - (void *) &dummy); + lr_save_offset = ((void *) &dummy.lr_save - (void *) &dummy); + + back_chain_loc = DWARF_LOC (c->dwarf.cfa + back_chain_offset, 0); + + if ((ret = + dwarf_get (&c->dwarf, back_chain_loc, &c->dwarf.cfa)) < 0) + { + Debug + ("Unable to retrieve CFA from back chain in stack frame - %d\n", + ret); + return ret; + } + if (c->dwarf.cfa == 0) + /* Unless the cursor or stack is corrupt or uninitialized we've most + likely hit the top of the stack */ + return 0; + + lr_save_loc = DWARF_LOC (c->dwarf.cfa + lr_save_offset, 0); + + if ((ret = dwarf_get (&c->dwarf, lr_save_loc, &c->dwarf.ip)) < 0) + { + Debug + ("Unable to retrieve IP from lr save in stack frame - %d\n", + ret); + return ret; + } + ret = 1; + } + else + { + /* Find the sigcontext record by taking the CFA and adjusting by + the dummy signal frame size. + + Note that there isn't any way to determined if SA_SIGINFO was + set in the sa_flags parameter to sigaction when the signal + handler was established. If it was not set, the ucontext + record is not required to be on the stack, in which case the + following code will likely cause a seg fault or other crash + condition. */ + + unw_word_t ucontext = c->dwarf.cfa + __SIGNAL_FRAMESIZE; + + Debug (1, "signal frame, skip over trampoline\n"); + + c->sigcontext_format = PPC_SCF_LINUX_RT_SIGFRAME; + c->sigcontext_addr = ucontext; + + sp_loc = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R1, 0); + ip_loc = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_NIP, 0); + + ret = dwarf_get (&c->dwarf, sp_loc, &c->dwarf.cfa); + if (ret < 0) + { + Debug (2, "returning %d\n", ret); + return ret; + } + ret = dwarf_get (&c->dwarf, ip_loc, &c->dwarf.ip); + if (ret < 0) + { + Debug (2, "returning %d\n", ret); + return ret; + } + + /* Instead of just restoring the non-volatile registers, do all + of the registers for now. This will incur a performance hit, + but it's rare enough not to cause too much of a problem, and + might be useful in some cases. */ + c->dwarf.loc[UNW_PPC32_R0] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R0, 0); + c->dwarf.loc[UNW_PPC32_R1] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R1, 0); + c->dwarf.loc[UNW_PPC32_R2] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R2, 0); + c->dwarf.loc[UNW_PPC32_R3] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R3, 0); + c->dwarf.loc[UNW_PPC32_R4] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R4, 0); + c->dwarf.loc[UNW_PPC32_R5] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R5, 0); + c->dwarf.loc[UNW_PPC32_R6] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R6, 0); + c->dwarf.loc[UNW_PPC32_R7] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R7, 0); + c->dwarf.loc[UNW_PPC32_R8] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R8, 0); + c->dwarf.loc[UNW_PPC32_R9] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R9, 0); + c->dwarf.loc[UNW_PPC32_R10] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R10, 0); + c->dwarf.loc[UNW_PPC32_R11] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R11, 0); + c->dwarf.loc[UNW_PPC32_R12] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R12, 0); + c->dwarf.loc[UNW_PPC32_R13] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R13, 0); + c->dwarf.loc[UNW_PPC32_R14] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R14, 0); + c->dwarf.loc[UNW_PPC32_R15] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R15, 0); + c->dwarf.loc[UNW_PPC32_R16] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R16, 0); + c->dwarf.loc[UNW_PPC32_R17] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R17, 0); + c->dwarf.loc[UNW_PPC32_R18] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R18, 0); + c->dwarf.loc[UNW_PPC32_R19] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R19, 0); + c->dwarf.loc[UNW_PPC32_R20] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R20, 0); + c->dwarf.loc[UNW_PPC32_R21] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R21, 0); + c->dwarf.loc[UNW_PPC32_R22] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R22, 0); + c->dwarf.loc[UNW_PPC32_R23] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R23, 0); + c->dwarf.loc[UNW_PPC32_R24] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R24, 0); + c->dwarf.loc[UNW_PPC32_R25] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R25, 0); + c->dwarf.loc[UNW_PPC32_R26] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R26, 0); + c->dwarf.loc[UNW_PPC32_R27] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R27, 0); + c->dwarf.loc[UNW_PPC32_R28] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R28, 0); + c->dwarf.loc[UNW_PPC32_R29] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R29, 0); + c->dwarf.loc[UNW_PPC32_R30] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R30, 0); + c->dwarf.loc[UNW_PPC32_R31] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R31, 0); + + c->dwarf.loc[UNW_PPC32_LR] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_LINK, 0); + c->dwarf.loc[UNW_PPC32_CTR] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_CTR, 0); + /* This CR0 assignment is probably wrong. There are 8 dwarf columns + assigned to the CR registers, but only one CR register in the + mcontext structure */ + c->dwarf.loc[UNW_PPC32_CR0] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_CCR, 0); + c->dwarf.loc[UNW_PPC32_XER] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_XER, 0); + c->dwarf.loc[UNW_PPC32_NIP] = + DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_NIP, 0); + + /* TODO: Is there a way of obtaining the value of the + pseudo frame pointer (which is sp + some fixed offset, I + assume), based on the contents of the ucontext record + structure? For now, set this loc to null. */ + c->dwarf.loc[UNW_PPC32_FRAME_POINTER] = DWARF_NULL_LOC; + + c->dwarf.loc[UNW_PPC32_F0] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R0, 0); + c->dwarf.loc[UNW_PPC32_F1] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R1, 0); + c->dwarf.loc[UNW_PPC32_F2] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R2, 0); + c->dwarf.loc[UNW_PPC32_F3] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R3, 0); + c->dwarf.loc[UNW_PPC32_F4] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R4, 0); + c->dwarf.loc[UNW_PPC32_F5] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R5, 0); + c->dwarf.loc[UNW_PPC32_F6] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R6, 0); + c->dwarf.loc[UNW_PPC32_F7] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R7, 0); + c->dwarf.loc[UNW_PPC32_F8] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R8, 0); + c->dwarf.loc[UNW_PPC32_F9] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R9, 0); + c->dwarf.loc[UNW_PPC32_F10] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R10, 0); + c->dwarf.loc[UNW_PPC32_F11] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R11, 0); + c->dwarf.loc[UNW_PPC32_F12] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R12, 0); + c->dwarf.loc[UNW_PPC32_F13] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R13, 0); + c->dwarf.loc[UNW_PPC32_F14] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R14, 0); + c->dwarf.loc[UNW_PPC32_F15] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R15, 0); + c->dwarf.loc[UNW_PPC32_F16] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R16, 0); + c->dwarf.loc[UNW_PPC32_F17] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R17, 0); + c->dwarf.loc[UNW_PPC32_F18] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R18, 0); + c->dwarf.loc[UNW_PPC32_F19] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R19, 0); + c->dwarf.loc[UNW_PPC32_F20] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R20, 0); + c->dwarf.loc[UNW_PPC32_F21] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R21, 0); + c->dwarf.loc[UNW_PPC32_F22] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R22, 0); + c->dwarf.loc[UNW_PPC32_F23] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R23, 0); + c->dwarf.loc[UNW_PPC32_F24] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R24, 0); + c->dwarf.loc[UNW_PPC32_F25] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R25, 0); + c->dwarf.loc[UNW_PPC32_F26] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R26, 0); + c->dwarf.loc[UNW_PPC32_F27] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R27, 0); + c->dwarf.loc[UNW_PPC32_F28] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R28, 0); + c->dwarf.loc[UNW_PPC32_F29] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R29, 0); + c->dwarf.loc[UNW_PPC32_F30] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R30, 0); + c->dwarf.loc[UNW_PPC32_F31] = + DWARF_LOC (ucontext + UC_MCONTEXT_FREGS_R31, 0); + + ret = 1; + } + } + return ret; +} diff --git a/src/ppc32/Lglobal.c b/src/ppc32/Lglobal.c new file mode 100644 index 00000000..6d7b489e --- /dev/null +++ b/src/ppc32/Lglobal.c @@ -0,0 +1,5 @@ +#define UNW_LOCAL_ONLY +#include <libunwind.h> +#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) +#include "Gglobal.c" +#endif diff --git a/src/ppc32/Linit.c b/src/ppc32/Linit.c new file mode 100644 index 00000000..e9abfdd4 --- /dev/null +++ b/src/ppc32/Linit.c @@ -0,0 +1,5 @@ +#define UNW_LOCAL_ONLY +#include <libunwind.h> +#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) +#include "Ginit.c" +#endif diff --git a/src/ppc32/Lregs.c b/src/ppc32/Lregs.c new file mode 100644 index 00000000..2c9c75cd --- /dev/null +++ b/src/ppc32/Lregs.c @@ -0,0 +1,5 @@ +#define UNW_LOCAL_ONLY +#include <libunwind.h> +#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) +#include "Gregs.c" +#endif diff --git a/src/ppc32/Lresume.c b/src/ppc32/Lresume.c new file mode 100644 index 00000000..41a8cf00 --- /dev/null +++ b/src/ppc32/Lresume.c @@ -0,0 +1,5 @@ +#define UNW_LOCAL_ONLY +#include <libunwind.h> +#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) +#include "Gresume.c" +#endif diff --git a/src/ppc32/Lstep.c b/src/ppc32/Lstep.c new file mode 100644 index 00000000..c1ac3c75 --- /dev/null +++ b/src/ppc32/Lstep.c @@ -0,0 +1,5 @@ +#define UNW_LOCAL_ONLY +#include <libunwind.h> +#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) +#include "Gstep.c" +#endif diff --git a/src/ppc64/Make-arch.in b/src/ppc32/Make-arch.in index 947dd5fa..947dd5fa 100644 --- a/src/ppc64/Make-arch.in +++ b/src/ppc32/Make-arch.in diff --git a/src/ppc32/get_func_addr.c b/src/ppc32/get_func_addr.c new file mode 100644 index 00000000..a9c828dc --- /dev/null +++ b/src/ppc32/get_func_addr.c @@ -0,0 +1,45 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford <cjashfor@us.ibm.com> + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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 "unwind_i.h" + +int +tdep_get_func_addr (unw_addr_space_t as, unw_word_t addr, + unw_word_t *entry_point) +{ + unw_accessors_t *a; + int ret; + + a = unw_get_accessors (as); + /* Entry-point is stored in the 1st word of the function descriptor. + In case that changes in the future, we'd have to update the line + below and read the word at addr + offset: */ + ret = (*a->access_mem) (as, addr, entry_point, 0, NULL); + if (ret < 0) + return ret; + return 0; +} diff --git a/src/ppc32/init.h b/src/ppc32/init.h new file mode 100644 index 00000000..7d9221ee --- /dev/null +++ b/src/ppc32/init.h @@ -0,0 +1,80 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford <cjashfor@us.ibm.com> + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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 "unwind_i.h" + +/* Here is the "common" init, for remote and local debuging" */ + +static inline int +common_init_ppc32 (struct cursor *c) +{ + int ret; + int i; + + for (i = UNW_PPC32_R0; i <= UNW_PPC32_R31; i++) { + c->dwarf.loc[i] = DWARF_REG_LOC (&c->dwarf, i); + } + for (i = UNW_PPC32_F0; i <= UNW_PPC32_F31; i++) { + c->dwarf.loc[i] = DWARF_FPREG_LOC (&c->dwarf, i); + } + + for (i = UNW_PPC32_CR0; i <= UNW_PPC32_CR7; i++) { + c->dwarf.loc[i] = DWARF_REG_LOC (&c->dwarf, i); + } + c->dwarf.loc[UNW_PPC32_ARG_POINTER] = DWARF_REG_LOC (&c->dwarf, UNW_PPC32_ARG_POINTER); + c->dwarf.loc[UNW_PPC32_CTR] = DWARF_REG_LOC (&c->dwarf, UNW_PPC32_CTR); + c->dwarf.loc[UNW_PPC32_VSCR] = DWARF_REG_LOC (&c->dwarf, UNW_PPC32_VSCR); + + c->dwarf.loc[UNW_PPC32_XER] = DWARF_REG_LOC (&c->dwarf, UNW_PPC32_XER); + c->dwarf.loc[UNW_PPC32_LR] = DWARF_REG_LOC (&c->dwarf, UNW_PPC32_LR); + c->dwarf.loc[UNW_PPC32_VRSAVE] = DWARF_REG_LOC (&c->dwarf, UNW_PPC32_VRSAVE); + c->dwarf.loc[UNW_PPC32_SPEFSCR] = DWARF_REG_LOC (&c->dwarf, UNW_PPC32_SPEFSCR); + c->dwarf.loc[UNW_PPC32_SPE_ACC] = DWARF_REG_LOC (&c->dwarf, UNW_PPC32_SPE_ACC); + + c->dwarf.loc[UNW_PPC32_NIP] = DWARF_REG_LOC (&c->dwarf, UNW_PPC32_NIP); + + ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_PPC32_NIP], &c->dwarf.ip); + if (ret < 0) + return ret; + + ret = dwarf_get (&c->dwarf, DWARF_REG_LOC (&c->dwarf, UNW_PPC32_R1), + &c->dwarf.cfa); + if (ret < 0) + return ret; + + c->sigcontext_format = PPC_SCF_NONE; + c->sigcontext_addr = 0; + + c->dwarf.args_size = 0; + c->dwarf.ret_addr_column = 0; + c->dwarf.pi_valid = 0; + c->dwarf.pi_is_dynamic = 0; + c->dwarf.hint = 0; + c->dwarf.prev_rs = 0; + + return 0; +} diff --git a/src/ppc32/is_fpreg.c b/src/ppc32/is_fpreg.c new file mode 100644 index 00000000..cccc5112 --- /dev/null +++ b/src/ppc32/is_fpreg.c @@ -0,0 +1,34 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford <cjashfor@us.ibm.com> + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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" + +PROTECTED int +unw_is_fpreg (int regnum) +{ + return (regnum >= UNW_PPC32_F0 && regnum <= UNW_PPC32_F31); +} diff --git a/src/ppc32/regname.c b/src/ppc32/regname.c new file mode 100644 index 00000000..d897a562 --- /dev/null +++ b/src/ppc32/regname.c @@ -0,0 +1,128 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford <cjashfor@us.ibm.com> + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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 "unwind_i.h" + +static const char *regname[] = + { + [UNW_PPC32_R0]="GPR0", + [UNW_PPC32_R1]="GPR1", + [UNW_PPC32_R2]="GPR2", + [UNW_PPC32_R3]="GPR3", + [UNW_PPC32_R4]="GPR4", + [UNW_PPC32_R5]="GPR5", + [UNW_PPC32_R6]="GPR6", + [UNW_PPC32_R7]="GPR7", + [UNW_PPC32_R8]="GPR8", + [UNW_PPC32_R9]="GPR9", + [UNW_PPC32_R10]="GPR10", + [UNW_PPC32_R11]="GPR11", + [UNW_PPC32_R12]="GPR12", + [UNW_PPC32_R13]="GPR13", + [UNW_PPC32_R14]="GPR14", + [UNW_PPC32_R15]="GPR15", + [UNW_PPC32_R16]="GPR16", + [UNW_PPC32_R17]="GPR17", + [UNW_PPC32_R18]="GPR18", + [UNW_PPC32_R19]="GPR19", + [UNW_PPC32_R20]="GPR20", + [UNW_PPC32_R21]="GPR21", + [UNW_PPC32_R22]="GPR22", + [UNW_PPC32_R23]="GPR23", + [UNW_PPC32_R24]="GPR24", + [UNW_PPC32_R25]="GPR25", + [UNW_PPC32_R26]="GPR26", + [UNW_PPC32_R27]="GPR27", + [UNW_PPC32_R28]="GPR28", + [UNW_PPC32_R29]="GPR29", + [UNW_PPC32_R30]="GPR30", + [UNW_PPC32_R31]="GPR31", + + [UNW_PPC32_F0]="FPR0", + [UNW_PPC32_F1]="FPR1", + [UNW_PPC32_F2]="FPR2", + [UNW_PPC32_F3]="FPR3", + [UNW_PPC32_F4]="FPR4", + [UNW_PPC32_F5]="FPR5", + [UNW_PPC32_F6]="FPR6", + [UNW_PPC32_F7]="FPR7", + [UNW_PPC32_F8]="FPR8", + [UNW_PPC32_F9]="FPR9", + [UNW_PPC32_F10]="FPR10", + [UNW_PPC32_F11]="FPR11", + [UNW_PPC32_F12]="FPR12", + [UNW_PPC32_F13]="FPR13", + [UNW_PPC32_F14]="FPR14", + [UNW_PPC32_F15]="FPR15", + [UNW_PPC32_F16]="FPR16", + [UNW_PPC32_F17]="FPR17", + [UNW_PPC32_F18]="FPR18", + [UNW_PPC32_F19]="FPR19", + [UNW_PPC32_F20]="FPR20", + [UNW_PPC32_F21]="FPR21", + [UNW_PPC32_F22]="FPR22", + [UNW_PPC32_F23]="FPR23", + [UNW_PPC32_F24]="FPR24", + [UNW_PPC32_F25]="FPR25", + [UNW_PPC32_F26]="FPR26", + [UNW_PPC32_F27]="FPR27", + [UNW_PPC32_F28]="FPR28", + [UNW_PPC32_F29]="FPR29", + [UNW_PPC32_F30]="FPR30", + [UNW_PPC32_F31]="FPR31", + + [UNW_PPC32_LR]="LR", + [UNW_PPC32_CTR]="CTR", + [UNW_PPC32_ARG_POINTER]="ARG_POINTER", + + [UNW_PPC32_CR0]="CR0", + [UNW_PPC32_CR1]="CR1", + [UNW_PPC32_CR2]="CR2", + [UNW_PPC32_CR3]="CR3", + [UNW_PPC32_CR4]="CR4", + [UNW_PPC32_CR5]="CR5", + [UNW_PPC32_CR6]="CR6", + [UNW_PPC32_CR7]="CR7", + + [UNW_PPC32_XER]="XER", + + [UNW_PPC32_VSCR]="VSCR", + + [UNW_PPC32_VRSAVE]="VRSAVE", + [UNW_PPC32_SPE_ACC]="SPE_ACC", + [UNW_PPC32_SPEFSCR]="SPEFSCR", + + }; + +PROTECTED const char * +unw_regname (unw_regnum_t reg) +{ + if (reg < (unw_regnum_t) ARRAY_SIZE (regname)) + return regname[reg]; + else + return "???"; +} diff --git a/src/ppc32/setcontext.S b/src/ppc32/setcontext.S new file mode 100644 index 00000000..d164d8db --- /dev/null +++ b/src/ppc32/setcontext.S @@ -0,0 +1,4 @@ + .global _UI_setcontext + +_UI_setcontext: + retq diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h new file mode 100644 index 00000000..c4cfe0fc --- /dev/null +++ b/src/ppc32/ucontext_i.h @@ -0,0 +1,173 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford <cjashfor@us.ibm.com> + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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. */ + +#ifndef ucontext_i_h +#define ucontext_i_h + +#include <ucontext.h> + +/* These values were derived by reading + /usr/src/linux-2.6.18-1.8/arch/um/include/sysdep-ppc/ptrace.h and + /usr/src/linux-2.6.18-1.8/arch/powerpc/kernel/ppc32.h +*/ + +#define NIP_IDX 32 +#define MSR_IDX 33 +#define ORIG_GPR3_IDX 34 +#define CTR_IDX 35 +#define LINK_IDX 36 +#define XER_IDX 37 +#define CCR_IDX 38 +#define SOFTE_IDX 39 +#define TRAP_IDX 40 +#define DAR_IDX 41 +#define DSISR_IDX 42 +#define RESULT_IDX 43 + +#define VSCR_IDX 32 +#define VRSAVE_IDX 33 + +/* These are dummy structures used only for obtaining the offsets of the + various structure members. */ +static ucontext_t dmy_ctxt; +static vrregset_t dmy_vrregset; + +#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[0] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[1] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[2] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[3] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[4] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[5] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[6] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[7] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[8] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[9] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[10] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[11] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[12] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[13] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[14] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[15] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[16] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[17] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[18] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[19] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[20] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[21] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[22] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[23] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[24] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[25] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[26] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[27] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[28] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[29] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[30] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[31] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_NIP ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[NIP_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[MSR_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CTR_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[LINK_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[XER_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CCR_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[SOFTE_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[TRAP_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DAR_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DSISR_IDX] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[RESULT_IDX] - (void *)&dmy_ctxt) + +#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[0] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[1] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[2] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[3] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[4] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[5] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[6] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[7] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[8] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[9] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[10] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[11] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[12] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[13] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[14] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[15] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[16] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[17] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[18] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[19] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[20] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[21] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[22] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[23] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[24] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[25] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[26] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[27] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[28] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[29] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[30] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[31] - (void *)&dmy_ctxt) +#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[32] - (void *)&dmy_ctxt) + +#define UC_MCONTEXT_V_REGS ((void *)&dmy_ctxt.uc_mcontext.v_regs - (void *)&dmy_ctxt) + +#define UC_MCONTEXT_VREGS_R0 ((void *)&dmy_vrregset.vrregs[0] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R1 ((void *)&dmy_vrregset.vrregs[1] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R2 ((void *)&dmy_vrregset.vrregs[2] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R3 ((void *)&dmy_vrregset.vrregs[3] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R4 ((void *)&dmy_vrregset.vrregs[4] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R5 ((void *)&dmy_vrregset.vrregs[5] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R6 ((void *)&dmy_vrregset.vrregs[6] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R7 ((void *)&dmy_vrregset.vrregs[7] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R8 ((void *)&dmy_vrregset.vrregs[8] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R9 ((void *)&dmy_vrregset.vrregs[9] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R10 ((void *)&dmy_vrregset.vrregs[10] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R11 ((void *)&dmy_vrregset.vrregs[11] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R12 ((void *)&dmy_vrregset.vrregs[12] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R13 ((void *)&dmy_vrregset.vrregs[13] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R14 ((void *)&dmy_vrregset.vrregs[14] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R15 ((void *)&dmy_vrregset.vrregs[15] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R16 ((void *)&dmy_vrregset.vrregs[16] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R17 ((void *)&dmy_vrregset.vrregs[17] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R18 ((void *)&dmy_vrregset.vrregs[18] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R19 ((void *)&dmy_vrregset.vrregs[19] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R20 ((void *)&dmy_vrregset.vrregs[20] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R21 ((void *)&dmy_vrregset.vrregs[21] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R22 ((void *)&dmy_vrregset.vrregs[22] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R23 ((void *)&dmy_vrregset.vrregs[23] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R24 ((void *)&dmy_vrregset.vrregs[24] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R25 ((void *)&dmy_vrregset.vrregs[25] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R26 ((void *)&dmy_vrregset.vrregs[26] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R27 ((void *)&dmy_vrregset.vrregs[27] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R28 ((void *)&dmy_vrregset.vrregs[28] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R29 ((void *)&dmy_vrregset.vrregs[29] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R30 ((void *)&dmy_vrregset.vrregs[30] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_R31 ((void *)&dmy_vrregset.vrregs[31] - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_VSCR ((void *)&dmy_vrregset.vscr - (void *)&dmy_vrregset) +#define UC_MCONTEXT_VREGS_VRSAVE ((void *)&dmy_vrregset.vrsave - (void *)&dmy_vrregset) + +#endif diff --git a/src/ppc32/unwind_i.h b/src/ppc32/unwind_i.h new file mode 100644 index 00000000..c3c3a57f --- /dev/null +++ b/src/ppc32/unwind_i.h @@ -0,0 +1,47 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2006-2007 IBM + Contributed by + Corey Ashford <cjashfor@us.ibm.com> + Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> + +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. */ + +#ifndef unwind_i_h +#define unwind_i_h + +#include <memory.h> +#include <stdint.h> + +#include <libunwind-ppc32.h> + +#include <libunwind_i.h> +#include <sys/ucontext.h> + +#define ppc32_lock UNW_OBJ(lock) +#define ppc32_local_resume UNW_OBJ(local_resume) +#define ppc32_local_addr_space_init UNW_OBJ(local_addr_space_init) + +extern void ppc32_local_addr_space_init (void); +extern int ppc32_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, + void *arg); + +#endif /* unwind_i_h */ diff --git a/src/ppc64/Gstep.c b/src/ppc64/Gstep.c index ca5a686e..20b22b51 100644 --- a/src/ppc64/Gstep.c +++ b/src/ppc64/Gstep.c @@ -137,7 +137,7 @@ unw_step (unw_cursor_t * cursor) Debug (1, "signal frame, skip over trampoline\n"); - c->sigcontext_format = PPC64_SCF_LINUX_RT_SIGFRAME; + c->sigcontext_format = PPC_SCF_LINUX_RT_SIGFRAME; c->sigcontext_addr = ucontext; sp_loc = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R1, 0); diff --git a/src/ppc64/init.h b/src/ppc64/init.h index cab6a844..886f14c4 100644 --- a/src/ppc64/init.h +++ b/src/ppc64/init.h @@ -28,7 +28,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "unwind_i.h" static inline int -common_init (struct cursor *c) +common_init_ppc64 (struct cursor *c) { int ret; int i; @@ -67,7 +67,7 @@ common_init (struct cursor *c) if (ret < 0) return ret; - c->sigcontext_format = PPC64_SCF_NONE; + c->sigcontext_format = PPC_SCF_NONE; c->sigcontext_addr = 0; c->dwarf.args_size = 0; diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c index f1803224..ae54cd58 100644 --- a/src/ptrace/_UPT_reg_offset.c +++ b/src/ptrace/_UPT_reg_offset.c @@ -286,6 +286,7 @@ int _UPT_reg_offset[UNW_REG_LAST + 1] = // [UNW_X86_64_EFLAGS] = 0x90, // [UNW_X86_64_RSP] = 0x98, // [UNW_X86_64_SS] = 0xa0 +#elif defined(UNW_TARGET_PPC32) #elif defined(UNW_TARGET_PPC64) #else # error Fix me. |