Usually we don't have a valid location for the SP but we keep calculating
the value of the CFA. The ARM backend should return this value instead.
Signed-off-by: Ken Werner <ken.werner@linaro.org>
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>
DWARF expressions are more powerful than the ARM specific unwind tables.
Therefore DWARF should be the preferred unwind method.
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 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>
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>
Implements a check for call to sigreturn that the kernel will have
setup before jumping to the signal handler.
Signed-off-by: Ken Werner <ken.werner@linaro.org>
If mmap fails, be sure to close the maps file before returning an error.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Signed-off-by: Ken Werner <ken.werner@linaro.org>
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>
This prevents the linker from complaining about a missing symbol when
building the test-setjmp test case.
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>
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>
in elf_map_image() to ensure mapped files have a valid ELF header.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Signed-off-by: Arun Sharma <asharma@fb.com>
Eliminates obfuscating variables in favor of adding files directly
to library SOURCES. Eliminates the need for EXTRA_DIST variable.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Rather than building the sources directly, create a library that
gets linked statically into libunwind.la and libunwind-$(arch).la.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Build DWARF source files into automake convenience libraries to
eliminate duplication in arch-dependent library build rules.
Adds a configure-time check to determine whether to use them.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Eliminate redundant listing of libunwind_setjmp source files by
using automake's '+=' operator.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Use automake's '+=' to simplify include_HEADERS rules. Move most
EXTRA_DIST files to noinst_HEADERS, eliminating duplication of headers
listed by include_HEADERS. Add MIPS and PPC32 headers that were not
being distributed previously.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Eliminates unused libraries from test program linking. Substitutes
'$(top_builddir)' for '..' to clarify library locations.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
The -static-libcxa test only applies for the Intel compiler, but the
check could pass for some versions of GCC. It would be accepted with
a warning in the past, but it produces an error with GCC 4.6.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Ensure that --enable-debug-frame is set automatically when building
libunwind for an ARM target. Other targets continue to have
--disable-debug-frame as the default setting.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Adds numerous AC_MSG_CHECKING and AC_MSG_RESULT pairings for
configuration tests that were previously unreported. Relocates
the debug configuration to the same part of the file as the command
line option declaration for associative clarity. Makes it easier
to confirm the resultant configuration matches original intentions.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Frees newly created address space memory in the event of a failure
caused by an endian mismatch.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>