summaryrefslogtreecommitdiffstats
path: root/libunwind/src
Commit message (Collapse)AuthorAgeFilesLines
...
* unwind: remove a second instance of -Wexpansion-to-definedSaleem Abdulrasool2016-04-201-5/+8
| | | | | | | Remove the use of undefined behaviour in the c preprocessor by always defining the value according to the state that was being checked. NFC. llvm-svn: 266916
* unwind: remove an instance of -Wexpansion-to-definedSaleem Abdulrasool2016-04-201-4/+9
| | | | | | | | | | | | This follows the pattern in the Apple clause duplicating a tuple of definitions. However, it will define them to a value rather than a defined check to remove the `-Wexpansion-to-defined` warning (which may be treated as an error). This also opens the door to unifying the two code paths into one. NFC. llvm-svn: 266915
* unwind: unify _LIBUNWIND_SUPPORT_DWARF_UNWINDSaleem Abdulrasool2016-04-201-8/+5
| | | | | | | | Join the two paths for this macro. At the end of the day, the difference was that MIPS and ARM on Apple have different behaviour. This is a setup change to remove an instance of -Wexpansion-to-defined. NFC. llvm-svn: 266913
* [AArch64] Fix libunwind build when using GNU assemblerRenato Golin2016-02-112-6/+6
| | | | | | | | | | | | | | | | | Use x29 and x30 for fp and lr respectively. This does not change the code generation with integrated asm but using x30 and x29 helps compile the code with gnu as. Currently gas fails to assemble this code with errors as below. Error: operand X should be an integer register. Newer versions of binutils should be fixed, but enough exists in the wild to make this change harmless and worthy. Patch by Khem Raj. llvm-svn: 260595
* Introduce NetBSD supportKamil Rytarowski2016-02-061-2/+3
| | | | | | Current FreeBSD and NetBSD code is compatible. llvm-svn: 260001
* Make it possible to use libunwind without heap.Peter Zotov2015-11-092-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to use libunwind on bare-metal systems that do not include malloc/free by conditionally turning off nonessential functionality that requires these functions. The disabled functionality includes: * the .cfi_remember_state and .cfi_restore_state instructions; * the DWARF FDE cache. The .cfi_{remember,restore}_state instructions don't seem to be used by contemporary compilers. None of the LLVM backends emit it. The DWARF FDE cache is bypassed if _LIBUNWIND_NO_HEAP is defined. Specifically, entries are never added to it, so the search begins and ends at the statically allocated, empty initial cache. Such heap-less libunwind on a bare metal system is successfully used in the ARTIQ project[1], and it is my hope that it will be useful elsewhere. [1]: http://m-labs.hk/artiq Differential Revision: http://reviews.llvm.org/D11897 llvm-svn: 252452
* Add FreeBSD _Unwind_Ptr typedefEd Maste2015-10-161-1/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D13820 llvm-svn: 250541
* unwind: Allow the building of libunwind for MIPS.Vasileios Kalintiris2015-09-263-1/+13
| | | | | | | | | | | | | | | | | | | | | | Summary: Currently, libunwind doesn't support MIPS. However, with this patch we do allow the library to build, and we warn the user about the lack of support for MIPS. Also, the dummy unw_getcontext() implementation for MIPS just traps on function entry in order to avoid any confusion with silent/weird failures at runtime. This allows us to test an LLVM-based toolchain without the dependency on a GCC toolchain. Of course, C++ exception handling and other things that depend on stack unwinding will not work until we add a proper implementation of the stub functions. Reviewers: compnerd, logan Subscribers: dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D13160 llvm-svn: 248673
* unwind: cleanup -Wunused-parameterSaleem Abdulrasool2015-09-011-6/+7
| | | | | | Cleanup a number of `-Wunused-parameter` warnings. NFC. llvm-svn: 246528
* [libunwind] Add support for OpenRISC 1000.Peter Zotov2015-08-315-0/+279
| | | | | | | | | This patch makes no assumptions on ABI past the ABI defined in the OpenRISC 1000 spec except that the DWARF register numbers will be 0-31 for registers r0-r31, which is true for both gcc and clang at the moment. llvm-svn: 246413
* [libunwind] Remove unused includes.Peter Zotov2015-08-273-6/+0
| | | | llvm-svn: 246143
* unwind: fix invalid memory accessSaleem Abdulrasool2015-08-211-1/+1
| | | | | | | | Fix out-of-bounds array access when setting arm float registers. Patch by Leandro GraciĆ” Gil! llvm-svn: 245665
* Enable zero-cost exceptions on non-Apple arm64 platformsEd Maste2015-08-132-2/+5
| | | | | | | | | | Use the canonical __aarch64__ predefined macro for 64-bit ARM. Apple- specific cases are left as __arm64__. Also add an #error for unsupported architectures to catch this sort of case in the future. Differential Revision: http://reviews.llvm.org/D12005 llvm-svn: 244893
* Correct sense of unwind return address register range assertionEd Maste2015-08-131-1/+1
| | | | | | | I encountered this on FreeBSD/arm64, and then found the same issue was reported by Daniil Troshkov. llvm-svn: 244892
* [ARM/Unwind] Fix wrong usage of write-back on register saveRenato Golin2015-08-061-1/+1
| | | | | | | | | | | | | The register save routine in libunwind was using write-back addressing mode to r0 for thumb, when that was not only different from the ARM version and more importantly the register restore, but also saving the wrong address. Patch by Manuel Freiberger. Fixes PR24331. llvm-svn: 244237
* [libunwind] Flip order of extern "C" and attribute(visibility)Renato Golin2015-07-241-1/+1
| | | | | | | GCC doesn't seems to like having the attribute before extern, but Clang accepts it either way. This patch makes it compile on both. llvm-svn: 243147
* unwind: Fix libc++abi and libgcc build.Logan Chien2015-07-241-35/+7
| | | | | | | | | | | | To build libc++abi without libunwind, we should make sure that all function calls to _Unwind_{Get,Set}{GR,IP}() are inlined as function calls to _Unwind_VRS_{Get,Set}(). Otherwise, libc++abi.so will fail to link since libgcc does not provide these symbol at all. This commit fixes the problem by providing both the inlined version and exported version. llvm-svn: 243073
* libunwind: Introduce __libunwind_config.h.Logan Chien2015-07-198-27/+27
| | | | | | | Introduce __libunwind_config.h to avoid cross repository circular dependency with libcxxabi. llvm-svn: 242642
* Fix unw_getcontext() return value on AArch64.Logan Chien2015-06-251-1/+1
| | | | | | | | unw_getcontext() should return UNW_ESUCCESS on success. Therefore, the assembly for AArch64 is incorrect because "ldr x0, #0" is a PC-relative load instead of an immediate value load. llvm-svn: 240648
* Avoid C99 for-declaration statement in C files. (NFC)Logan Chien2015-06-251-2/+2
| | | | | | | To compile libunwind with gcc/g++ 4.9, it is required to avoid the for-declaration statement from C99. llvm-svn: 240609
* Code cleanup: Reindent statements.Logan Chien2015-05-301-3/+3
| | | | llvm-svn: 238656
* libunwind: Fix unw_step() for ARM EHABI.Logan Chien2015-05-293-73/+95
| | | | | | | | | | | | | | | | | | | This commit fixes the unw_step() for ARM EHABI. However, this commit also changes the implementation details for ARM EHABI. The first change is that the personality function should call __gnu_unwind_frame() for default (or de facto) frame unwinding based on the ARM-defined unwind opcode. The function __gnu_unwind_frame() will in turn calls unw_step() which actually unwinds the frame. The second change is that the implementation _Unwind_Backtrace() should no longer calls unw_step() to unwind the frame; since according to ARM EHABI, the personality function should unwind the frame for us. Special thanks to Anton for helpful suggestion on the initial version of this patch. llvm-svn: 238560
* unwind: permit building against libstdc++Saleem Abdulrasool2015-05-111-0/+1
| | | | | | | | Include algorithm early as otherwise you get a number of particularly unhelpful messages about failed static assertions. This fixes compilation on Linux with gcc. llvm-svn: 237002
* Fix libunwind to build on FreeBSDViktor Kutuzov2015-05-061-2/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D9272 llvm-svn: 236585
* Make the .eh_frame_hdr code work on FreeBSD as well.Ed Schouten2015-04-291-1/+8
| | | | | | | | | | | | | | | We currently only include <link.h> on CloudABI and Linux. We can enable it on FreeBSD as well, as it also supports the dl_iterate_phdr() function that's provided by <link.h>. FreeBSD, however, does not provide the ElfW() macro. Instead, the host-specific ELF datastructures are named just Elf_XXX in addition to the host-independent Elf32_XXX and Elf64_XXX types. Differential Revision: http://reviews.llvm.org/D8169 Approved by: emaste llvm-svn: 236154
* unwind: remove inclusion of private_typeinfo.hSaleem Abdulrasool2015-04-271-1/+0
| | | | | | | | | | This include is not currently used. It is intended for type info based switching, which is part of the EHABI specification. However, the unwinder does not currently support this functionality. This backwards dependency into libc++abi is currently causing a buildbot failure, remove it until we have a better solution. llvm-svn: 235893
* unwind: clean up warnings from the buildSaleem Abdulrasool2015-04-251-1/+4
| | | | | | | | | | | | Now thta the build is split, clean up some of the warnings in the build: cc1: warning: command line option '-nostdinc++' is valid for C++/ObjC++ but not for C cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C Append the C++ specific flags specifically to the C++ sources. Avoids the spurious warnings due to invalid flags being passed during the compilation of C++ sources. llvm-svn: 235797
* libunwind: add new build logicSaleem Abdulrasool2015-04-251-61/+52
| | | | | | | This replicates most of the build infrastructure from libc++abi ported to libunwind. This allows building libunwind without requiring libc++abi. llvm-svn: 235795
* unwind: move src/Unwind, include/, and test/ unwind contentSaleem Abdulrasool2015-04-2422-0/+10395
This moves the majority of the unwind sources into the new project layout for libunwind. This was previously discussed on llvmdev at [1]. This is a purely movement related change, with the build infrastructure currently still residing in the libc++abi repository. [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/081507.html llvm-svn: 235758
OpenPOWER on IntegriCloud