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

105 commits

Author SHA1 Message Date
Arun Sharma e2962af9d3 Implement a cheaper getcontext()
Since the fast unwinding code path doesn't need the full context,
a faster target dependent getcontext is implemented.

Signed-off-by: Lassi Tuura <lat@cern.ch>
2011-04-05 22:07:05 -07:00
Arun Sharma 15f182828d Use __thread instead of pthread_getspecific() 2011-04-05 22:06:51 -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 3b9fd99cb7 Assign copyright as requested by the author. 2011-03-25 00:20:49 -07:00
Lassi Tuura f1ea02be58 Reset 'used' to zero after expanding frame cache hash table. 2011-03-25 00:20:48 -07:00
Lassi Tuura 44a14d1364 Integrate fast trace into backtrace(). 2011-03-24 22:33:55 -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
Lassi Tuura 28f33c8ce0 Auto-detect whether to use msync() or mincore() for address validation. 2011-03-24 21:02:28 -07:00
Arun Sharma 99e60be5a4 Fix the page boundary crossing bug.
Signed-off-by: Jason Evans <jasone@canonware.com>
2010-06-08 14:44:07 -07:00
Konstantin Belousov e1493dc011 Merge branch 'master' into freebsd 2010-05-03 17:59:50 +03:00
Arun Sharma aa3bb307a3 Fix merge errors 2010-05-03 07:47:41 -07:00
Konstantin Belousov b73c618a31 Merge branch 'master' into freebsd 2010-05-02 16:29:02 +03:00
Arun Sharma 0176c4f723 Merge commit 'fdc534ccb05d1e6c0438345d292203343a811701' 2010-04-28 17:27:38 -07:00
Arun Sharma fdc534ccb0 Silence a compiler warning 2010-04-28 16:38:27 -07:00
Arun Sharma 215afa30b7 Add unwind descriptors to getcontext.S 2010-04-28 16:32:30 -07:00
Arun Sharma c140d8598d Undo commit f252f5ff4e for now.
Seems to introduce a couple of test breakages.
2010-04-25 09:44:59 -07:00
Arun Sharma d3c4bc4295 Fix a compiler warning 2010-04-25 09:24:40 -07:00
Lassi Tuura 045c55b2a2 Be conservative in all pointer derefrences by default.
Since most people can't completely control their compile or runtime
environment, it becomes hard to ensure that unwind data is perfect.
2010-04-24 19:24:49 -07:00
Lassi Tuura d4fbc8326a Detect end of stack in x86-64 rbp-based walk. 2010-04-24 19:22:08 -07:00
Lassi Tuura 92cc7fd78a Remove obsolete code for 'old way' of handling x86-64 signal frames. 2010-04-24 19:21:52 -07:00
Lassi Tuura f252f5ff4e Recognise and unwind through PLT. 2010-04-24 19:21:26 -07:00
Lassi Tuura a9dce3c06e During the stack unwinding process, the return address points to
the instruction after the call for a normal frame. libunwind uses
IP-1 to lookup unwind information. However, this is not necessary for
interrupted frames such as signal frames (or interrupt frames) in
the kernel context.

This patch handles both cases correctly.

Based on work by Mark Wielaard <mwielaard@redhat.com>
2010-04-24 19:16:09 -07:00
Lassi Tuura dac2d001af Identify signal frames by augmentation attribute. 2010-04-24 17:18:26 -07:00
Konstantin Belousov 58f290e1ce Add config.h. 2010-04-21 15:43:05 +03:00
Konstantin Belousov 2709abc883 msync() also may be called on unaligned address. 2010-04-21 15:33:37 +03:00
Konstantin Belousov 4454413242 Account for possible unaligned access. 2010-04-21 15:18:02 +03:00
Konstantin Belousov ee99dbec87 Use mincore instead of msync when available 2010-04-20 17:45:18 +03:00
Konstantin Belousov b1c68e060c Arrange the FreeBSD ucontext offset definitions in ascending order. 2010-04-17 00:17:58 +03:00
Arun Sharma 1d9c5a356d Fix compiler warnings on x86_64 Linux 2010-04-14 12:01:37 -07:00
Konstantin Belousov 1e77c66a51 Fix FreeBSD/x86_64 sigcontext restore 2010-04-14 12:04:28 +03:00
Konstantin Belousov 21f0e90ce8 Rework 69001646fa, store sigframe address into sigcontext_addr. 2010-04-11 22:01:08 +03:00
Konstantin Belousov 69001646fa Store the ucontext_t pointer to properly handle resume across signal frames. 2010-04-11 13:48:14 +03:00
Konstantin Belousov f01a043712 Convince gcc that x86_64_sigreturn cannot return, as declared. 2010-04-11 13:47:28 +03:00
Konstantin Belousov 6f7b335e89 Add my copyrights to several files that contain essential modifications 2010-04-10 01:42:26 +03:00
Arun Sharma caa6095aec Fix compile errors on Linux 2010-04-07 19:59:06 -07:00
Konstantin Belousov 979af4502f Move local_resume to os-specific file. 2010-04-05 23:00:27 +03:00
Konstantin Belousov 0dbeeeb08d Move uc_addr to os-specific file 2010-04-05 22:42:23 +03:00
Konstantin Belousov aeee03dd74 Reduce diffs to master 2010-04-05 16:28:46 +03:00
Konstantin Belousov ccc0ae665b More move of osdep code. 2010-04-05 16:25:36 +03:00
Konstantin Belousov a40641f326 Trim spaces 2010-04-05 16:25:20 +03: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 31ece3eaa1 Fix setcontext for amd64 freebsd 2010-04-03 18:28:31 +03:00
Konstantin Belousov 9bb9c972e6 Merge with origin/master 2010-03-31 16:01:38 +03: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
Konstantin Belousov 752ce15c4f Preliminary version of freebsd syscall unwinder 2010-03-08 19:45:54 +02:00
Konstantin Belousov 89e1df2d32 Fix _UI_siglongjmp_cont name 2010-03-08 15:55:29 +02:00
Konstantin Belousov 0f1c0f5f66 Fix resume. 2010-03-08 15:51:39 +02:00
Konstantin Belousov 43ed5b3e56 Add required assembler magic. 2010-03-08 00:57:50 +02:00
Konstantin Belousov 093855f12a Remove unneeded includes of sys/types.h 2010-03-08 00:25:22 +02:00