Using malloc is not an option since unw_init_local and unw_step are supposed
to be async signal safe. Therefore this code path can be removed.
Signed-off-by: Ken Werner <ken.werner@linaro.org>
There is no need for libunwind to set/fake a name of the elf file from which
the program header came from.
Signed-off-by: Ken Werner <ken.werner@linaro.org>
Move code that does not necessarily need to reside in the ex_tables.h header
file into ex_tables.c. Add comments and remove unused code.
Signed-off-by: Ken Werner <ken.werner@linaro.org>
This eliminates the arm_stackframe and therefore the need to synchronize the
two models. It also clears the way for unwinding call stacks with mixed
DWARF- and extbl-frames.
Signed-off-by: Ken Werner <ken.werner@linaro.org>
Uses ex_tables routines to provide a new means of unwinding the stack.
Set UNW_ARM_UNWIND_METHOD=4 to use ARM-specific unwinding tables.
Signed-off-by: Ken Werner <ken.werner@linaro.org>
This results in different unwi_unwind_method symbol names for the local and
generic versions. It allows to statically link against both libraries.
Signed-off-by: Ken Werner <ken.werner@linaro.org>
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>
The behavior on wait vs abort unwind depends on the locking primitive
chosen by the user. This makes the API consistent and independent of
the locking primitive.
Greetings,
Here is the second part, actually implementing the configure option.
Thanks,
--
Paul Pluzhnikov
commit cf823ed0d4d2447aa91af0e3cb5fbb6a6cba5068
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
Date: Mon Sep 21 11:37:38 2009 -0700
New configure option to allow caller to block signals.
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>
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>
bad/missing unwind information, which could result in libunwind
dereferencing bad pointers. This mechanism is based on msync(2) system
call and significantly reduces the chances of a bad pointer
dereference in libunwind.
The original idea was to turn this mechanism on only when necessary
i.e. libunwind didn't find proper unwind information for a IP.
There are a couple of problems in the current implementation.
* The flag is global and is modified without locking
* The flag isn't reset when starting a new unwind
The attached patch makes ->validate a per-thread setting by moving it
into struct cursor from unw_local_addr_space and resets it to false
when starting a new unwind. As a result, cursor->as_arg points to the
cursor itself instead of the ucontext (for the local case).
This was found to reduce the number of msync() system calls from an
application using libunwind significantly.
Signed-off-by: Paul Pluzhnikov <ppluzhnikov@google.com>
Signed-off-by: Arun Sharma <arun.sharma@google.com>
* Use explicit types for XMM registers
* Support full width (128 bits) access
Signed-off-by: Andrew Cagney <cagney@redhat.com>
Signed-off-by: Arun Sharma <aruns@google.com>