1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-09 02:28:12 +01:00
Commit graph

82 commits

Author SHA1 Message Date
Tommi Rantala
aed6c8b994 Check __builtin___clear_cache() at configuration time
Fixup commit 39b83981 ("Flush icache with __builtin___clear_cache() in
tests when compiling with GCC") to fix compilation with older GCC
versions that do not provide __builtin___clear_cache().
2012-09-04 13:26:13 +03:00
Tommi Rantala
5b55e556ca test-resume-sig-rt: test unw_resume() in presence of "realtime" signal frame
Introduce a new test case that is derived from test-resume-sig, but
using the SA_SIGINFO sigaction() flag. This case is referred in the
linux kernel sources as "realtime" signal handler, and is handled
differently in the kernel on many architectures and in libunwind as
well.
2012-08-21 22:33:56 +03:00
Arun Sharma
201bb8733d Use libtool to build libunwind-ptrace 2012-08-18 12:41:21 -07:00
Konstantin Belousov
04c77cced4 Fix for test suite build in the separate directory.
Avoid manually coding the rule to build crasher, instead fuddle
the compiler so that even -O2 optimization does not eliminate call
to b().

First, put calls to both a() and b() in the b() into non-tail-recursive
position. Second, as recommended in gcc manual, use asm volatile("");
to prevent further prevent inlining, besides attribute((noinline).
And third, call b() by alias, which current gcc optimizer cannot see
through.

Also, do not dereference NULL in a, and mark the memory access as volatile.
[ Minor portability improvements: asharma@fb.com ]
2012-08-11 22:02:55 -07:00
Martin Milata
4ab9e5dd10 MiniDebugInfo test: tests/run-coredump-unwind-mdi
Test that creates MiniDebugInfo-containing binary and then checks if it
can recover the procedure names from its coredump.

Signed-off-by: Martin Milata <mmilata@redhat.com>
2012-08-10 15:29:03 +02:00
Martin Milata
de28c51e63 Build libunwind-coredump using libtool
So that it builds shared/pic library that can be linked with other
libraries.

Signed-off-by: Martin Milata <mmilata@redhat.com>
2012-07-04 17:01:44 -07:00
Martin Milata
0f9a540c8c coredump: add test
Program test-coredump-unwind was modified to map backing files based on
virtual addresses instead of segment numbers.

The crasher.c is a program that essentially calls some functions and
then writes to invalid address causing a crash. Before that, it detects
which executables are mapped to which virtual addresses and writes this
information to a file suitable for consumption by test-coredump-unwind.
The mapping information is obtained form /proc/self/maps, so currently
it only works on linux.

The test itself is a shell script, which first runs the program and then
runs test-coredump-unwind on the resulting core and address space
map file to check whether the stack trace obtained from the dump roughly
corresponds to what it should look like.

Signed-off-by: Martin Milata <mmilata@redhat.com>
2012-05-31 11:00:40 +02:00
Martin Milata
d93d96ad83 Fix compilation on IA64
- Add tdep macro for {dwarf,ia64}_find_unwind_table so that ia64
   doesn't try to use dwarf code.
 - Fix extraneous #if.
 - Fix mistyped filename in Makefile.am.
 - Link ia64-specific tests with correct libraries.

Signed-off-by: Martin Milata <mmilata@redhat.com>
2012-05-23 20:52:28 -07:00
Arun Sharma
46dfe3ecf5 Fixup whitespace in Makefile. 2012-03-14 17:20:58 -07:00
Arun Sharma
f0bb806ecb Move the test case to tests dir. 2012-03-12 20:11:49 -07:00
Arun Sharma
42b67080eb Fix linker errors with recent binutils
Without this, tests that called unw_getcontext() got a linker error

Signed-off-by: Arun Sharma <asharma@fb.com>
2011-10-15 23:03:46 -07:00
Arun Sharma
1d8e2c1ae5 Explicitly specify the libraries
Without this linking fails with gold and newer versions of ld.
2011-09-10 19:57:10 -07:00
Sven Neumann
f195c9ad52 Skip a few tests on uCLibC
Without this, the build fails on platforms that don't implement
backtrace().
2011-08-27 21:54:52 -07:00
Ken Werner
d589e20506 Add the appropriate libraries to the *_LDADD variables.
The test-async-sig.c, test-flush-cache.c and Ltest_resume_sig.c define
UNW_LOCAL_ONLY and therefore only need LIBUNWIND_local. Gtest-dyn1.c is
calling '_U_dyn_cancel' and test-trace.c is using 'unw_backtrace' which
are in LIBUNWIND_local.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
2011-04-21 17:25:42 +02:00
Arun Sharma
d86155f72e Add a test to catch calls to calloc from libunwind
We'd like to avoid calls to all malloc related functions
so libunwind is still usable from such allocators.

Signed-off-by: Paul Pluzhnikov <ppluzhnikov@google.com>
2011-04-05 20:59:03 -07:00
Arun Sharma
4dc222cf8a Undo parts of 2f9b04e9c2
Linking to local unwind library seems to be unrelated to
failures seen earlier.
2011-04-05 13:41:29 -07:00
Arun Sharma
2f9b04e9c2 Mark slow_backtrace() ALWAYS_INLINE
Also fix Makefile.am so remote unwinding tests such Gtest-trace
don't link with the local unwind library (libunwind.a).
2011-03-31 22:58:07 -07:00
Arun Sharma
741a5a2149 Add some performance tests for fast backtracing. 2011-03-25 00:20:46 -07:00
Arun Sharma
7ff83c051e Fix up compilation and test failures 2011-03-24 23:32:25 -07:00
Lassi Tuura
9e98f15e9a Fast back-trace for x86_64 for only collecting the call stack.
Adds new function to perform a pure stack walk without unwinding,
functionally similar to backtrace() but accelerated by an address
attribute cache the caller maintains across calls.
2011-03-24 22:33:17 -07:00
Arun Sharma
6c1a58fd06 Remove the unused arm_extbl_test_LDADD from Makefile.am 2011-03-24 21:49:17 -07:00
Ken Werner
6e25c11505 Remove the arm-extbl-test.
This test case relies on old libunwind internals such as the arm_stackframe.
Since the ARM extbtl-parser now operates on the DWARF model directly the
arm-extbl-test isn't of any particular use anymore.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
2011-03-24 20:42:01 -07:00
Konstantin Belousov
04fc88fa31 Fix build and distribution on the FreeBSD.
Signed-off-by: Konstantin Belousov <kostikbel@gmail.com>
2011-03-24 20:41:07 -07:00
Arun Sharma
0613d4c680 Fixup trailing whitespace
Signed-off-by: Arun Sharma <asharma@fb.com>
2011-03-22 08:40:49 -07:00
Arun Sharma
57695518b3 Replace libuwind-elf32.la with $(LIBUNWIND_ELF)
This was needed to fix build errors on x86_64.

Signed-off-by: Arun Sharma <asharma@fb.com>
2011-03-22 08:34:33 -07:00
Zachary T Welch
4870386087 Add test of backtracing using ARM-specific tables
Uses .ARM.exidx and .ARM.extbl sections to produce a backtrace.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
2011-03-22 08:15:03 -07:00
Ken Werner
c2cc122a62 Explicitly add dependent shared libraries.
This adds support for linkers that do not pull in the dependent shared
libraries of libunwind-$(arch).la and libunwind-setjmp.la implicitly.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
2011-03-07 21:24:50 -08:00
Zachary T Welch
7e767a2838 Improve test LDADD settings.
Eliminates unused libraries from test program linking.  Substitutes
'$(top_builddir)' for '..' to clarify library locations.

Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
2010-11-29 11:28:35 -08:00
Zachary T Welch
651e9bb4fd Add MAINTAINERCLEANFILES to Makefile.am files.
Ensures 'make maintainer-clean' removes files generated by autotools.

Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
2010-11-08 09:06:09 -08:00
Arun Sharma
982d590ddb Add Gtest-nomalloc.c to EXTRA_DIST so we pass "make check" 2010-08-04 15:11:19 -07:00
Konstantin Belousov
74677edb23 Reverse local change 2010-04-20 17:54:16 +03:00
Konstantin Belousov
ee99dbec87 Use mincore instead of msync when available 2010-04-20 17:45:18 +03:00
Arun Sharma
c2d78041cc GCC compatibility on x86 for C++ exception handling 2010-04-12 12:08:43 -07:00
Konstantin Belousov
59d38aaccd Properly handle -ldl and -lutil 2010-03-07 12:46:05 +02:00
Paul Pluzhnikov
9626d66019 Fix a race condition in dwarf unwinding.
Original code was accessing rs_cache memory without holding a lock
in some cases. If there was sufficient cache pressure, entry being
accessed may be overwritten by another thread, resulting in a data
race.

We now make a thread local copy of the data, before releasing the
lock. If we end up supporting UNW_CACHE_PER_THREAD properly
in the future, this memcpy should be unnecessary.
2009-11-24 15:18:48 -08:00
Arun Sharma
576b59e4b1 Verify that we don't call malloc when unwinding locally. 2009-03-16 21:34:48 -07:00
Jose Flavio Aguilar Paulino
a1e7ee4836 Just a small patch to build system, it helps if you build in a power
without altivec.
2007-08-06 20:23:42 -06:00
Jose Flavio Aguilar Paulino
b33021e4b2 Add PPC64 support. 2007-08-02 09:59:43 -06:00
hp.com!davidm
f60827dc5c (LIBUNWIND_local): New macro.
(LIBUNWIND): Mention $(LIBUNWIND_local).
(test_setjmp_LDADD): Likewise.
(ia64_teset_setjmp_LDADD): Likewise.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
hp.com!davidm
b4f1459444 (EXTRA_DIST): Mention run-ptrace-misc.
(check_SCRIPTS_cdep): Mention run-ptrace-misc.
(noinst_PROGRAMS_cdep): Mention test-ptrace-misc.
(Gtest_bt_SOURCES): New macro.
(Ltest_bt_SOURCES): Likewise.
(test_ptrace_misc_SOURCES)L: Likewise.

(Logical change 1.276)
2004-10-15 13:48:38 +00:00
hp.com!davidm
dfa582a2df (noinst_PROGRAMS_cdep): Move bt to...
(check_PROGRAMS_cdep): ...here as Gtest-bt/Ltest-bt.

(Logical change 1.270)
2004-09-15 11:37:04 +00:00
hp.com!davidm
8f2272c097 (noinst_PROGRAMS_arch): Move ia64-test-sig to...
(check_PROGRAMS_arch): ...here.  Mention ia64-test-setjmp.
(ia64_test_setjmp_LDADD): Mention libunwind-setjmp.la.

(Logical change 1.259)
2004-08-31 13:59:10 +00:00
homeip.net!davidm
3eb739d290 (check_PROGRAMS_cdep): Move test-init-remote from check_PROGRAMS_common to here
so it doesn't get built in the REMOTE_ONLY-case.

(Logical change 1.252)
2004-08-19 14:03:54 +00:00
bea.com!thallgre
42a90f14d5 (check_PROGRAMS_common): Mention test-strerror.
(Logical change 1.245)
2004-08-18 15:16:46 +00:00
hp.com!davidm
d5933d6e74 (check_PROGRAMS_common): Mention test-init-remote.
(Logical change 1.243)
2004-08-18 10:50:12 +00:00
hp.com!davidm
86bef150e4 (check_PROGRAMS_cdep): Mention Gia64-test-readonly and Lia64-test-readonly.
(Lia64_test_readonly_SOURCES): New macro.
(Gia64_test_readonly_SOURCES): Likewise.

(Logical change 1.231)
2004-05-06 20:26:29 +00:00
mostang.com!davidm
0c8baa7a79 (EXTRA_DIST): Also mention run-check-namespace.
(Logical change 1.227)
2004-05-05 05:03:20 +00:00
mostang.com!davidm
5a468e30cc (EXTRA_DIST): Mention check-namespace.sh.in.
(check_SCRIPTS_common): Mention run-check-namespace.

(Logical change 1.225)
2004-05-05 01:58:44 +00:00
mostang.com!davidm
4de259b49f (EXTRA_DIST): Mention run-ptrade-mapper.
(test_static_link_LDFLAGS): Replace -all-static with -static.
	The former doesn't work on HP-UX because libc doesn't appear
	to be availabale in archive format (only libc.so is available).
(forker_LDFLAGS): Likewise.

(Logical change 1.223)
2004-05-04 22:24:50 +00:00
mostang.com!davidm
6cb58ac940 (check_SCRIPTS_cdep): Mention run-ptrace-mapper.
(noinst_PROGRAMS_cdep): Mention mapper.

(Logical change 1.209)
2004-04-21 07:24:35 +00:00