1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-05-19 11:35:17 +02:00
Commit graph

192 commits

Author SHA1 Message Date
Arun Sharma 781d5d5263 One time whitespace fixup.
for f in $(find src include -name '*.[ch]'); do
  expand -t 8 $f > $tmp; mv $tmp $f;
done
2014-09-27 09:47:23 -07:00
Konstantin Belousov 3723511003 Adjust use_prev_instr for syscall and frame-chain frames.
Mark frames which are unwound with the frame-chain walker or
syscall frame code, as non-interrupted.  The return PC in the frame
points to the instruction after the call.
2014-08-15 13:01:36 -07:00
Konstantin Belousov 85946d9766 Use helper to walk past the syscall frames on FreeBSD/x86, similar to FreeBSD/x86_64.
The syscall trampolines in FreeBSD libc do not have unwind annotations.
2014-08-15 13:01:33 -07:00
dave lerner 8028a537dd unw_is_signal_frame should return false/0 for bad addresses
access_mem() could fail and return a non-zero value, which callers
interpret as boolean true.

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
2013-03-10 14:59:44 -07:00
Tommi Rantala aebba1f8a7 Apply `define_lock()'
We have a nice macro for defining pthread mutexes, use it.
2012-09-28 14:51:21 +03:00
Tommi Rantala ee8df26288 Constify `dwarf_to_unw_regnum_map' 2012-09-28 14:50:03 +03:00
Tommi Rantala ded94b98ff Stop including `memory.h'
I am unable to find any reference to `memory.h' in the C99 and C11
committee drafts, so include `string.h' instead when we need memset() or
similar.
2012-09-28 14:50:03 +03:00
Tommi Rantala 5d0f376b08 Invert tdep_init() flag logic
Invert the flag that signals that tdep_init() was called, to move the
symbol from data to BSS.
2012-09-28 14:06:07 +03:00
Tommi Rantala 5fef17c05d Fix memory leaks in unw_create_addr_space() wrong-endian error paths
Check the endianness earlier in unw_create_addr_space() on all
architectures to avoid leaking the dynamically allocated address space
struct.

This was already fixed for ARM in commit cf6a998796 ("Fix memory leak
in ARM unw_create_addr_space()"). Move the endianness check also on ARM
to avoid malloc() & free() in the error case.
2012-08-21 22:33:29 +03:00
Konstantin Belousov 59328832f7 Provide the FreeBSD implementation for _UI_siglongjmp_cont on x86.
On FreeBSD, _NSIG is at least 128, so just pass a pointer to the
signal mask in the register.
Add my copyright.
2012-02-05 11:47:47 +02:00
Konstantin Belousov 1774384098 FreeBSD also supports PT_GNU_STACK. 2012-02-05 11:42:02 +02:00
Arun f89fb17695 Fix incorrect calls to memset.
Found when compiling libunwind with clang.

Signed-off-by: Paul Pluzhnikov <ppluzhnikov@google.com>
2011-10-02 22:43:28 -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 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 c84005e9c8 Add unwind annotations for freebsd/x86 getcontext.S.
Rearrange the code to put the slow branch out of main body,
and pinch the fixed amount of stack space to be able to annotate
the code.
2010-05-02 17:06:24 +03:00
Konstantin Belousov b73c618a31 Merge branch 'master' into freebsd 2010-05-02 16:29:02 +03:00
Arun Sharma 215afa30b7 Add unwind descriptors to getcontext.S 2010-04-28 16:32:30 -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
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 75b76d1f45 Save FPU context for i386. 2010-04-17 00:18:33 +03:00
Arun Sharma 5a70fab451 Fix compiler warnings on x86 Linux 2010-04-14 18:54:20 -07:00
Konstantin Belousov 127acf8e97 Use correct offset name and value for ucontext offset in struct sigframe 2010-04-14 12:15:05 +03:00
Konstantin Belousov 0d311ea161 Add abort() after sigreturn calls 2010-04-14 12:10:34 +03:00
Konstantin Belousov 34b064bf22 Fix typo. 2010-04-14 12:10:14 +03:00
Konstantin Belousov 02d0cb6f71 Do not save FPU context on x86 for now; XMM save area must be 16-bytes aligned 2010-04-13 14:20:22 +03:00
Konstantin Belousov ae7eebb839 Separate getcontext implementation for x86 2010-04-13 14:11:39 +03:00
Konstantin Belousov 66e49bdd41 Save %eax for i386 2010-04-13 13:55:23 +03:00
Konstantin Belousov 5a7407dd94 Merge branch 'master' into freebsd 2010-04-12 22:34:24 +03:00
Giuseppe Scrivano eb8857a324 Silence a compiler warning 2010-04-12 10:45:31 -07:00
Konstantin Belousov 21f0e90ce8 Rework 69001646fa, store sigframe address into sigcontext_addr. 2010-04-11 22:01:08 +03:00
Konstantin Belousov f10f851916 Add slightly more debug output 2010-04-11 14:59:36 +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 dd1c7b6c1a Declare mxcsr as XMM 2010-04-10 18:48:35 +03:00
Konstantin Belousov 53f7e650e0 For FreeBSD/i386, add real offset values for FPU context fields. 2010-04-10 18:48:16 +03:00
Konstantin Belousov 6f7b335e89 Add my copyrights to several files that contain essential modifications 2010-04-10 01:42:26 +03:00
Konstantin Belousov 9fe75c7d93 Save FPU state when saving context. For XMM-capable CPUs only (for now). 2010-04-10 00:47:08 +03:00
Konstantin Belousov 117ccd246d Move all XMM offsets into one place. 2010-04-10 00:46:51 +03:00
Konstantin Belousov f6546e27ed Implement the base code to fetch x86/xmm state on x86. Offsets to be filled. 2010-04-10 00:40:39 +03:00
Konstantin Belousov 2c50c95cde Correct arguments for Debug().
Shut up warning by using the cast.
2010-04-10 00:38:54 +03:00
Arun Sharma d1676f192e Fix warnings on 32 bit x86 2010-04-08 03:12:05 -07: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 79d012348d Move get_scratch_loc() to os-specific file. 2010-04-05 22:22:55 +03:00
Konstantin Belousov aeee03dd74 Reduce diffs to master 2010-04-05 16:28:46 +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 980ccffe9e Merge remote branch 'origin/master' into freebsd
Conflicts:
	src/x86/Gis_signal_frame.c
2010-04-04 12:44:10 +03:00