1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-15 20:58:13 +01:00
Commit graph

381 commits

Author SHA1 Message Date
Ken Werner
e4593e2493 Increase alternate signal stack size.
Creating an alternate signal stack with a size of SIGSTKSZ (usually 8k) is
not enough on some targets because unw_cursor_t is bigger than that already.
Since the size of unw_cursor_t is part of the ABI the UNW_TDEP_CURSOR_LEN
can't be changed without breaking existent code. Therefore size of the
alternate signal stack has been increased to 1 MiB.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
2011-04-05 20:59:10 -07: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
Lassi Tuura
5f38f35d5d Drop a call frame in tdep_trace and avoid a call to unw_step.
Dropping the extra frame for unw_backtrace itself using unw_step is
approximately 15% slower than skipping the frame in tdep_trace.  So
drop the frame in the latter, and make the function a private
implementation detail for libunwind, not an exported interface.

Also moves unw_getcontext call back into unw_backtrace to avoid an
extra call frame in case slow_backtrace does not get inlined into
unw_backtrace.
2011-04-01 00:00:39 -07:00
Lassi Tuura
50bc12afba Export unw_backtrace() and alias backtrace() to it. 2011-04-01 00:00:33 -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
27d0dbfecb Ensure tests pass on 32 bit x86. 2011-03-25 14:34:41 -07:00
Lassi Tuura
3b9fd99cb7 Assign copyright as requested by the author. 2011-03-25 00:20:49 -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
Zachary T Welch
13cd3b0c26 Fix test-ptrace argument parsing.
Avoids an endless loop when passing unknown options.

Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Signed-off-by: Ken Werner <ken.werner@linaro.org>
2011-03-07 21:24:51 -08: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
Arun Sharma
546463d1e7 Factor out and export dwarf_find_debug_frame() function
Signed-off-by: Andris Zeila <andris.zeila@accenture.com>
2010-05-26 19:21:30 -07:00
Arun Sharma
215afa30b7 Add unwind descriptors to getcontext.S 2010-04-28 16:32:30 -07:00
Arun Sharma
c2d78041cc GCC compatibility on x86 for C++ exception handling 2010-04-12 12:08:43 -07:00
Konstantin Belousov
fd88f41818 Merge remote branch 'origin/master' into freebsd
Conflicts:
	src/x86/Gis_signal_frame.c
	src/x86/Gstep.c
	src/x86_64/Gis_signal_frame.c
	src/x86_64/Gstep.c
2010-04-05 16:14:50 +03:00
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
459b2a5ba8 Normalize test code 2010-04-04 17:09:33 +03:00
Konstantin Belousov
574d32a829 malloc.h is not needed. 2010-04-04 11:59:31 +03:00
Konstantin Belousov
6e07e94d5d Revert "Test for malloc.h."
This reverts commit 22b17269cf.
2010-04-04 11:57:57 +03:00
Konstantin Belousov
22b17269cf Test for malloc.h. 2010-04-03 23:34:33 +03:00
Konstantin Belousov
9bb9c972e6 Merge with origin/master 2010-03-31 16:01:38 +03:00
Arun Sharma
d3ddc9b96b Cap the runtime for rs-race 2010-03-10 22:57:43 -08:00
Arun Sharma
f8a15e9679 Fix a couple of test breakages on x86_64
setcontext() now restores the signal mask. Also remove a check
in the test that doesn't seem to be valid.
2010-03-10 22:52:12 -08:00
Arun Sharma
24112f6d9b Fix some test failures on x86_64 on distros with small default stacks. 2010-03-10 21:13:26 -08:00
Konstantin Belousov
d737709640 Close #if 2010-03-11 00:02:11 +02:00
Konstantin Belousov
3b026a7ed8 Fix i386 distinctions between freebsd and linux for mcontext. 2010-03-10 23:51:09 +02:00
Konstantin Belousov
4b3ca293bf Fix PT_SYSCALL ignoring of ip 2010-03-08 17:01:31 +02:00
Konstantin Belousov
ad932154a6 Port test-ptrace 2010-03-08 00:50:50 +02:00
Konstantin Belousov
da357e3c2e Revert "sys/types.h"
This reverts commit 5976f1a5b3.
2010-03-08 00:20:23 +02:00
Konstantin Belousov
59d38aaccd Properly handle -ldl and -lutil 2010-03-07 12:46:05 +02:00
Konstantin Belousov
5976f1a5b3 sys/types.h 2010-03-06 17:47:26 +02:00
Konstantin Belousov
d7f5141075 MAP_ANONYMOUS 2010-03-06 16:46:52 +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
Paul Pluzhnikov
890a630d76 Fix tests/Gtest-concurrent.c to test all caching policies
Greetings,

Attached patch is rather on the obvious side: setting caching policy and
than doing nothing is pointless; we'd better acutally test that it works!

Tested on Linux/x86_64.

Thanks,
--
Paul Pluzhnikov
2009-11-24 11:12:49 -08:00
Belisko Marek
570c09a2af Fix another compiler warning. 2009-10-16 14:26:55 -07:00
Paul Pluzhnikov
b56375e76a Reduce stack use and apply CONFIG_DEBUG_FRAME to more code.
Currently, libunwind allocates several PATH_MAX entries on stack, while
trying to find a binary via /proc/.../maps.

However stack space may be at premium (especially when sigaltstack is used),
and PATH_MAX on Linux is 4096, while SIGSTKSZ is only 8192 on x86.

Attached patch eliminates multiple PATH_MAX stack allocations, and simplifies
code in maps_next, at the cost of being unable to do anything if we can't
mmap one page. It appears to me that under such low-memory conditions,
libunwind will fail shortly elsewhere anyway.

This patch also disables more of debug_frame-handling code when
CONFIG_DEBUG_FRAME is undefined.

Tested on Linux/x86_64 with and without CONFIG_DEBUG_FRAME, no regressions.
2009-10-07 12:51:03 -07:00
Paul Pluzhnikov
b7e3444fea When libunwind is configured with --enable-block-signals=no,
we must block recursion via sighandlers by "external" means.
2009-09-25 14:17:35 -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
1227c41d20 Disable C++ exception support by default on x86. 2009-03-16 21:57:08 -07:00