1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-17 21:47:37 +01:00
Commit graph

77 commits

Author SHA1 Message Date
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