1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-16 15:01:45 +02:00
Commit graph

131 commits

Author SHA1 Message Date
Arun Sharma 8e53e62db9 Refactor os specific code for x86 (both 32 and 64 bit).
Move Linux specific code into ${arch}/Gos-linux.c
2010-04-04 16:46:13 -07:00
Konstantin Belousov 53095e6b3e Code for resume 2010-03-07 23:43:07 +02:00
Konstantin Belousov 2646e0fde8 Add freebsd stub 2010-03-06 17:51:00 +02:00
Konstantin Belousov 905034ce72 Initial attempt at the build infrastructure for FreeBSD. 2010-03-06 00:41:37 +02:00
Paul Pluzhnikov 54752e0df0 Implement getcontext for x86
Greetings,

Attached patch implements getcontext for x86.

Motivation is the same as:
http://lists.nongnu.org/archive/html/libunwind-devel/2008-06/msg00009.html

This also fixes check-name-space on x86.

Tested on Linux/86 with no new failures.

Thanks,
--
Paul Pluzhnikov
2009-12-23 09:59:52 -08:00
Arun Sharma 4b8404d153 Remove the special casing of ia64 for GetIPInfo()
This rule (no IP adjustment on ia64) may be correct for locating the right FDE.

Unfortunately the same adjusted/unadjusted return address is being used also by
__gxx_personality_v0() to locate the right call-site (the try {} block) for
unwinding.  And this case is already sensitive for off-by-one PC values.
Unlike the FDE location where the function prologue + epilogue make it immune
against off-by-one PC calculations.

Therefore suggesting to unify it with non-ia64 case.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
2009-04-24 11:10:08 -07:00
Arun Sharma 2fce54102c Implement _Unwind_GetIPInfo() as required by the C++ ABI
Provide a special implementation for ia64, because the unwind
information is such that an IP adjustment is not necessary before
looking up unwind info.

Bad things happen if libunwind only provides parts of the ABI and
the rest come from libgcc.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
2009-04-02 22:22:05 -07:00
Arun Sharma 5822fca27a Enable Intel C++ compatibility only when C++ exceptions are enabled. 2009-03-16 21:34:49 -07:00
Arun Sharma ef29eade44 This patch eliminates one system call per unwind by not using the
getcontext in libc.

Also cleanup the namespace (check-name-space passes on x86_64 now).
Replace uses of offsets.h with ucontext_i.h.
Rename _x86_64_setcontext to _Ux86_64_setcontext.

TBD: Add CFI annotations for get/setcontext.

Signed-off-by: Paul Pluzhnikov <ppluzhnikov@google.com>
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2008-06-16 14:42:16 -06:00
Arun Sharma 8081e82ba1 Make the linking of C++ ABI related code for exceptions optional.
The default is to have it enabled.

Signed-off-by: Arun Sharma <arun.sharma@google.com>
2008-06-16 14:28:36 -06:00
Daniel Jacobowitz 3842dac733 Add initial ARM and MIPS support. To support this, also enable the
reading of .debug_frame sections (used in lieu of .eh_frame sections
when they're not available).
2008-02-04 17:16:37 -07:00
Jose Flavio Aguilar Paulino 4499bb29a6 [PPC32] First check-in to add preliminary support for Linux/PPC32. 2007-09-12 21:52:25 -06:00
Jose Flavio Aguilar Paulino 32e2187fab [PPC64] Get "make check" to work on PPC64 Linux. Add a README entry
describing the expected results.
2007-08-27 09:11:37 -06:00
David Mosberger-Tang e6b9f350f7 Introduce a tdep_get_func_addr_hook() in the ELF lookup_symbol()
routine and add address-space argument.  This is needed because on
PPC64, a the function-name symbol refers to a function descriptor
(unlike, for example, on ia64, where the @fptr() operator is needed to
refer to a function descriptor).  Thus, in order to look up the name
of a function, we need to dereference the function descriptor.  To
make matters more "interesting", the function descriptors are normally
resolved by the dynamic linker, so we can't get their values from the
ELF file.  Instead, we have to read them from the running image, hence
the need for the address-space argument.
2007-08-22 13:02:09 -06:00
Arun Sharma bcca3ddcc0 [x86-64] Fix cross-compilation. setcontext.S can only be built natively. 2007-08-07 21:09:12 -06:00
David Mosberger-Tang 5c95d139df Cleanup some files from previous patch and rerurn autoconf tools. 2007-08-06 19:59:28 -06:00
Jose Flavio Aguilar Paulino b33021e4b2 Add PPC64 support. 2007-08-02 09:59:43 -06:00
Arun Sharma 497b987043 Add gen-offsets to the Makefile
This is so that the source file gets distributed and _ucontext_i.h is
generated properly on the target machine.

Signed-off-by: Arun Sharma <arun.sharma@google.com>
2007-04-10 20:18:56 -06:00
hp.com!davidm 3e8a50255c Include from tdep-$(arch) directory after the normal incliude directory.
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm 16af7ae96e (libunwind_setjmp_la_SOURCES_x86_64): Mention longjmp.S.
(libunwind_la_SOURCES_x86_64_common): Mention x86_64/setcontext.S.

2004/12/15 15:36:36-08:00 hp.com!davidm
(libunwind_ptrace_a_SOURCES): Mention _UPT_elf.c.
(libunwind_la_SOURCES_ia64_common): Move ELF files to here
	from libunwind_la_SOURCES_ia64.
(libunwind_la_SOURCES_hppa_common): Likewise.
(libunwind_la_SOURCES_x86_common): Likewise.
(libunwind_la_SOURCES_x86_64_common): Likewise.

2004/12/06 10:40:49-08:00 mostang.com!davidm
(libunwind_setjmp_la_SOURCES_common): Move files into
	setjmp subdirectory.
(libunwind_setjmp_la_SOURCES_hppa): Don't bother mentioning
	common files again.
(libunwind_setjmp_la_SOURCES_x86): Likewise.
(libunwind_setjmp_la_SOURCES_x86_64): Likewise.

2004/12/04 17:00:04-08:00 hp.com!davidm
(libunwind_la_SOURCES_hppa): Mention hppa/setcontext.S.

2004/12/02 00:40:45-08:00 mostang.com!davidm
(COMMON_SO_LDFLAGS): Drop -XCClinker -nostdlib and
	$(LDFLAGS_STATIC_LIBCXA) and move them...
(libunwind_la_LDFLAGS): ...to here instead.  We only want the
	local unwind-library built that way.
(libunwind_la_SOURCES_hppa_common): New macro.
(libunwind_la_SOURCES_hppa): Update.
(libunwind_hppa_la_SOURCES_hppa): New macro.

2004/11/23 16:59:56-08:00 mostang.com!davidm
(dwarf_SOURCES_common): Remove dwarf/dwarf-eh.h.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
hp.com!davidm 27a9067229 (libunwind_la_LIBADD): Append $(LIBCRTS).
(Logical change 1.280)
2004-11-03 21:50:24 +00:00
hp.com!davidm f4c8d534bc (libunwind_setjmp_la_SOURCES_ia64): Mention ia64/longjmp.S.
(Logical change 1.259)
2004-08-31 13:59:10 +00:00
hp.com!davidm 22d6f35cda (EXTRA_DIST): unwind-internal.h is now in unwind subdirectory.
(Logical change 1.257)
2004-08-26 10:02:46 +00:00
homeip.net!davidm f028c7db74 (lib_LTLIBRARIES_cdep_setjmp): New macro. Move libunwind-setjmp.la
from lib_LTLIBRARIES_cdep to here.
(libunwind_la_SOURCES_x86_64_common): Mention x86_64/ucontext_i.h so
	it gets included in the tar-ball, too.
(lib_LTLIBRARIES): List $(lib_LTLIBRARIES_cdep_setjmp) after the
	other libraries.

(Logical change 1.254)
2004-08-20 11:26:49 +00:00
ibm.com!masbock aa9a917cb4 Add x86_64 support.
(Logical change 1.249)
2004-08-19 13:39:10 +00:00
homeip.net!davidm ccdd644cf2 (SOVERSION): Change from 3:0:2 to 0:0:0 for ia64 unwind-specification compliance.
(Logical change 1.246)
2004-08-19 10:45:23 +00:00
bea.com!thallgre cb503ba4e5 (libunwind_la_SOURCES_common): Mention mi/strerror.c.
(Logical change 1.245)
2004-08-18 15:16:46 +00:00
hp.com!davidm f9c59cd814 Rename mk_Gcursor_i_ia64_SOURCES to ia64_mk_Gcursor_i_SOURCES.
Likewise for mk_Lcursor_i_ia64_SOURCES.

(Logical change 1.242)
2004-08-18 10:43:50 +00:00
homeip.net!davidm bf2c4541d9 Drop -FOO postfix now that we no longer need unique filenames across all directories.
(Logical change 1.241)
2004-08-17 15:34:28 +00:00
hp.com!davidm 051da9c0b6 (libunwind_la_SOURCES_local): Mention libunwind_la_SOURCES_os_local.
(libunwind_la_SOURCES_os_linux_local): New macro.
(libunwind_la_SOURCES_os_local): New macro.
(EXTRA_DIST): Mention libunwind_{hppa,ia64,x86}_la_SOURCES_{hppa,ia64,x86}.

(Logical change 1.233)
2004-05-06 22:02:00 +00:00
mostang.com!davidm c0f7c6f78a (libunwind_la_SOURCES_ia64_os): New macro defined only if OS_LINUX.
(libunwind_la_SOURCES_ia64): Move _ReadULEB.c/_ReadSLEB.c to above
	macro.

(Logical change 1.227)
2004-05-05 05:03:20 +00:00
mostang.com!davidm c47cf6a310 (libunwind_la_SOURCES_ia64_common): Remove ia64/rse.h.
(Logical change 1.221)
2004-05-04 22:16:57 +00:00
hp.com!davidm a8f38fc4dc (libunwind_la_SOURCES_ia64): Move comments about
_ReadULEB()/_ReadSLEB() where they don't hurt.

(Logical change 1.217)
2004-04-28 04:43:25 +00:00
hp.com!davidm ed32b99716 (SOVERSION): Change from 2:0:1 to 3:0:2.
(COMMON_SO_LDFLAGS): New macro.
(libunwind_setjmp_la_LDFLAGS): Mention $(Common_SO_LDFLAGS).
(libunwind_ia64_la_LDFLAGS): Likewise.
(libunwind_hppa_la_LDFLAGS): Likewise.
(libunwind_x86_la_LDFLAGS): Likewise.
(libunwind_la_LDFLAGS): Likewise.
(libunwind_setjmp_la_LIBADD): Mention -lc.
(libunwind_ia64_la_LIBADD): Likewise.
(libunwind_hppa_la_LIBADD): Likewise.
(libunwind_x86_la_LIBADD): Likewise.
(libunwind_la_LIBADD): Likewise.
(libunwind_la_SOURCES_ia64): Mention mi/_ReadULEB.c and mi/_ReadSLEB.c.
	They are needed for Intel 8.0 libunwind.so compatibility. ;-(

(Logical change 1.205)
2004-04-20 16:53:44 +00:00
hp.com!davidm a50c7801bd (libunwind_la_SOURCES_local): Mention mi/backtrace.c.
(Logical change 1.192)
2004-03-30 01:56:19 +00:00
mostang.com!davidm 0c923f12b0 (libunwind_la_SOURCES_ia64): Mention getcontext-ia64.S.
(Logical change 1.186)
2004-03-20 09:54:28 +00:00
mostang.com!davidm 6fef2ace65 Fix typo: ia64/Lcreate_addr_space-ia64 was missing ".c".
(Logical change 1.165)
2004-02-14 07:48:47 +00:00
hp.com!davidm 1738b3b637 Consolidate macros and share more code between different platforms.
(Logical change 1.162)
2004-01-30 00:01:24 +00:00
hp.com!davidm f06787a83b (dwarf_SOURCES_common): New macro.
(dwarf_SOURCES_local): Likewise.
(dwarf_SOURCES_generic): Likewise.
(libunwind_la_SOURCES_ia64_common): Mention flush_cache-ia64.c and
	ia64_regname-ia64.c.
(libunwind_la_SOURCES_Ia64): Lose files already mentioend in
	libunwind_la_SOURCES_ia64_common.
(libunwind_la_SOURCES_x86_common): Fix it.
(libunwind_la_SOURCES_x86): Likewise.
(libunwind_x86_la_SOURCES_x86): Likewise.
(libunwind_{ia64,hppa,x86}_la_LIBADD): Define only if !REMOTE_ONLY.

(Logical change 1.158)
2004-01-22 08:36:15 +00:00
mostang.com!davidm 4dedcd7c53 (libunwind_la_SOURCES_x86_common): Mention is_fpreg-x86.c.
(Logical change 1.156)
2004-01-21 01:05:07 +00:00
mostang.com!davidm c62eddaa2f (libunwind_la_SOURCES_ia64_common): Mention debug_level-ia64.c.
(Logical change 1.155)
2004-01-20 23:50:00 +00:00
mostang.com!davidm a6b0ccf783 Make lines fit in 80 columns again.
(libunwind_la_SOURCES_x86_common): Fix typo: rename from
	libunwind_la_SOURCES_x86.

(Logical change 1.152)
2004-01-14 06:21:52 +00:00
hp.com!davidm 1656663941 Major restructuring to allow for separate local-only vs. generic
libunwind.

(Logical change 1.151)
2004-01-03 10:50:24 +00:00
hp.com!davidm 23760816b3 (libunwind_la_SOURCES_common): Replace dyn-extract.c and dyn-remote.c
with generic and local-only versions.
(dwarf_sources): New macro.
(libbunwind_la_SOURCES_x86): Add $(dwarf_sources).
	Drop tables-x86.c it's not needed anymore.
(AM_CPPFLAGSG): Add architecture-specific include file.

(Logical change 1.146)
2003-12-20 11:50:00 +00:00
hp.com!davidm 0240946f92 (SOVERSION): Bump it.
(libunwind_la_SOURCES_local): Mention all the new _Unwind_* files.
(EXTRA_DIST): Mention unwind-internal.h.

(Logical change 1.135)
2003-12-04 07:44:21 +00:00
hp.com!davidm bd54a900bc (libunwind_la_SOURCES_x86): Mention x86/offsets.h.
(Logical change 1.131)
2003-11-27 07:17:47 +00:00
hp.com!davidm 8aff3354e2 Mention x86/set_caching_policy-x86.c.
(Logical change 1.104)
2003-09-25 05:29:14 +00:00
mostang.com!davidm 3e4f08bbf0 (SOVERSION): Change to 1:1:0.
Rename Gmk_cursor to mk_Gcursor, Lmk_cursor to mk_Lcursor so to avoid
scripts/make-L-files overwriting the (handcrafted) local version.
(EXTRA_DIST): Mention libunwind_la_SOURCES_os_hpux.

(Logical change 1.87)
2003-04-24 20:45:07 +00:00
mostang.com!davidm 8e85e811c0 (libunwind_la_SOURCES_ia64): Replace _Uia64_install_cursor.S with Ginstall_cursor.S
and Linstall_cursor.S.
(Gmk_cursor_i_ia64_SOURCES): Rename from mk_cursor_i_ia64_SOURCES.
(Lmk_cursor_i_ia64_SOURCES): New mcro.
(Gcursor_i.h): Rename rule from cursor_i.h.
(Lcursor_i.h): New rule.
(noinst_PROGRAMS): Rename mk_cursor_i-ia64 to Gmk_cursor_i-ia64 and add
	Lmk_cursor_i-ia64.
(BUILT_SOURCES): Ditto.

(Logical change 1.85)
2003-04-23 19:22:42 +00:00
mostang.com!davidm 693c4fa30c (libunwind_la_SOURCES_ia64): Rename _Uia64_install_context.S to
_Uia64_install_cursor.S.  Replace rbs-ia64.c with
	Grbs-ia64.c and Lrbs-ia64.c.

(Logical change 1.84)
2003-04-23 05:56:59 +00:00
hp.com!davidm 33e6e3fc1e (libunwind_la_SOURCES_x86): Mention regname-x86.c, Ginit_remote-x86.c,
Gis_signal_frame-x86.c, Gcreate_addr_space.c, Lcreate_addr_space.c,
	Linit_remote-x86,  and Lis_signal_frame-x86.c.

(Logical change 1.81)
2003-04-21 23:14:14 +00:00
hp.com!davidm ed625d646e (libunwind_la_SOURCES_x86): Mention Lset_reg-x86.c.
(Logical change 1.80)
2003-04-21 18:56:16 +00:00
hp.com!davidm 1b770df7ef (libunwind_la_SOURCES_x86): Mention Gset_reg-x86.c.
(Logical change 1.79)
2003-04-21 18:46:23 +00:00
mostang.com!davidm 5929f8e02b (libunwind_la_SOURCES_os_hpux): New macro.
(libunwind_la_SOURCES_os): For HP-UX, use libunwind_la_SOURCES_os_hpux.

(Logical change 1.75)
2003-04-03 07:59:15 +00:00
mostang.com!davidm 7407caa8c3 (libunwind_la_SOURCES_ia64): Add global-asm-ia64.S.
(libunwind_la_SOURCES_x86): Mention elf32.c, elf32.h, Gresume-x86.c, and
	Lresume-x86.c.

(Logical change 1.68)
2003-03-27 04:29:07 +00:00
mostang.com!davidm 0adb97c721 Reorganize a bit so "automake" can correctly figure out all the files that need
to be distributed.

(Logical change 1.63)
2003-03-19 19:25:18 +00:00
mostang.com!davidm 51f58db9b4 (libunwind_la_SOURCES_cdep): Mention _UPT_resume.c.
Delete obsolete comment.

(Logical change 1.59)
2003-03-06 06:14:36 +00:00
hp.com!davidm 57f0163a91 Auto merged
2003/03/04 16:13:44-08:00 hp.com!davidm
(EXTRA_DIST): New macro.  Mention elfxx.h and elfxx.c.  Reported by
	Arun Sharma.

(Logical change 1.58)
2003-03-05 00:13:58 +00:00
mostang.com!davidm 68c970298d (libunwind_la_SOURCES_cdep): Mention _UPT_get_proc_name.c.
(Logical change 1.56)
2003-02-27 09:58:57 +00:00
mostang.com!davidm 2f852c2e12 (libunwind_la_SOURCES_common): Replace get_proc_name.c with Gget_proc_name.c and
Lget_proc_name.c.

(Logical change 1.54)
2003-02-22 08:19:43 +00:00
mostang.com!davidm 5cef5934e8 Auto merged
2003/02/13 22:21:59-08:00 mostang.com!davidm
(libunwind_la_SOURCES_ia64): Mention elf64.h.

(Logical change 1.47)
2003-02-14 06:25:36 +00:00
hp.com!davidm 4dca76319d [REMOTE_ONLY]: Mention dummy "install-exec-hook".
(libunwind_la_SOURCES_cdep): Mention dyn-cancel.c and dyn-register.c.
(libunwind_la_SOURCES_common): Remove dyn-cancel.c and dyn-register.c

(Logical change 1.46)
2003-02-14 03:09:27 +00:00
mostang.com!davidm ad7f1470e3 (SETJMP_SO_VERSION): New macro.
(lib_LTLIBRARIES_cdep): Ditto.
(libunwind_setjmp_la_SOURCES_common): Ditto.
(libunwind_setjmp_la_LDFLAGS): Ditto.
(libunwind_setjmp_la_LIBADD): Ditto.
(libunwind_setjmp_la_SOURCES_ia64): Ditto.
(libunwind_setjmp_la_SOURCES_hppa): Ditto.
(libunwind_setjmp_la_SOURCES_x86): Ditto.
(libunwind_la_SOURCES_os): Define for OS_LINUX.
(libunwind_la_SOURCES_ia64): Mention elf64.c.
(AM_CPPFLAGS): Include from current working directory as well.
(AM_CCASFLAGS): Define to be the same as AM_CPPFLAGS.

(Logical change 1.45)
2003-02-08 10:10:59 +00:00
hp.com!davidm 74ee8e48f0 (libunwind_la_SOURCES_cdep): New macro. Mention _UPT routines.
(libunwind_la_SOURCES_common): Mention libunwind_la_SOURCES_cdep.

(Logical change 1.43)
2003-01-28 03:40:06 +00:00
mostang.com!davidm 427c1894c2 (SOVERSION): Increment "current" to reflect change in size of unw_cursor_t.
(libunwind_la_SOURCES_ia64): Mention rbs-ia64.c.

(Logical change 1.40)
2003-01-21 17:41:20 +00:00
mostang.com!davidm f6c7a65fdb (libunwind_la_SOURCES_hppa): New macro.
(libunwind_la_SOURCES_x86): Move outside of "if ARCH_X86" conditional.

(Logical change 1.33)
2003-01-14 07:11:56 +00:00
mostang.com!davidm 3ae9b81f52 (libunwind_la_SOURCES_common): Drop dyn-local.c, mention mi-init.c, mempool.c.
(libunwind_la_SOURCES_x86): Add.

(Logical change 1.32)
2002-12-19 07:16:50 +00:00
mostang.com!davidm afd39636d6 (libunwind_la_SOURCES_common): Add get_proc_name.c, dyn-cancel.c, dyn-extract.c,
{G,L}find_dynamic_proc_info, and {G,L}put_dynamic_unwind_info.
(libunwind_la_SOURCES): Rename generic files that get compiled twice from
	unw_foo to Gfoo.  Similarly, rename local-only files from Lunw_foo
	to Lfoo.

(Logical change 1.30)
2002-12-12 09:17:41 +00:00
mostang.com!davidm 58752cbc76 (libunwind_la_SOURCES_common): Mention dyn-common.h, dyn-local.c, and dyn-register.c.
(libunwind_la_SOURCES_ia64): Rename tables-glibc.c to tables.c.  Mention
	unw_find_dynamic_proc_info.c, unw_get_accessors, and local-only variants.

(Logical change 1.29)
2002-12-03 08:19:58 +00:00
mostang.com!davidm 9f4a51e8cf Mention new files.
(Logical change 1.27)
2002-11-16 06:50:04 +00:00
mostang.com!davidm 641d801905 (libunwind_la_SOURCES_common): Mention mempool.h and mempool.c.
(Logical change 1.19)
2002-07-18 03:58:34 +00:00
mostang.com!davidm a6d51ee1a6 (SOVERSION): New macro.
(install-exec-hook): Use this hook to create symlinks from architecture-specific
	library name to default name (libunwind.a/libunwind.so).
(libunwind_la_SOURCES_ia64): Mention unw_is_signal_frame.c and Lunw_is_signal_frame.c.
(libunwind_la_SOURCES): Drop.
(libunwind_ia64_la_LDFLAGS): New macro.
(libunwind_ia32_la_LDFLAGS): New macro.
(libunwind_la_LDFLAGS): Drop.

(Logical change 1.18)
2002-04-25 06:47:29 +00:00
mostang.com!davidm 00abcc6dc3 Always install library as libunwind-$(ARCH).a. Need to find a way to create
an alias, though.

(Logical change 1.17)
2002-04-19 05:35:46 +00:00
mostang.com!davidm e5a2726686 Rename shared.c to unw_regname.c.
(Logical change 1.16)
2002-04-12 05:02:40 +00:00
hp.com!davidm 73645af561 (libunwind_la_SOURCES_ia64): Mention ia64/regs.h.
(Logical change 1.14)
2002-04-12 04:21:19 +00:00
hp.com!davidm 6432d81f05 Multi-architecture support.
(Logical change 1.12)
2002-04-05 23:37:55 +00:00
hp.com!davidm 1bb24a283f (AM_CPPFLAGS): Define.
(libunwind_la_SOURCES): Mention unw_get_save_loc.c and Lunw_get_save_loc.c.

(Logical change 1.10)
2002-04-03 06:51:34 +00:00
mostang.com!davidm 42f9c357a8 Mention unw_get_fpreg.c and unw_set_fpreg.c.
(Logical change 1.9)
2002-04-01 23:01:22 +00:00
mostang.com!davidm 83b038d4aa Add local-only variants of files (Lfoo.c).
Add ia64/shared.c and ia64/init.h.

(Logical change 1.8)
2002-02-28 16:24:48 +00:00
mostang.com!davidm 95ce9146a7 Initial revision 2002-02-23 20:27:03 +00:00
mostang.com!davidm 1a9fe6168d (Logical change 1.7) 2002-02-23 20:27:03 +00:00