summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/Unwind/libunwind.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libc++abi: remove the duplicated unwind contentSaleem Abdulrasool2015-04-241-373/+0
| | | | | | | | | | The unwinder has been moved into its own project setup at http://svn.llvm.org/projects/libunwind/trunk. This simply removes the now duplicated content. This move was previously discussed on llvmdev at [1]. [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/081507.html llvm-svn: 235759
* Unwind: always define unwind APIsSaleem Abdulrasool2015-03-091-4/+0
| | | | | | | | These interfaces are not zero cost related, but rather generic unwind APIs used by consumers of the Unwind library. Always provide the definition as they are needed for both Zero Cost and Frame Table based implementations. llvm-svn: 231666
* Unwind: clean up some GCC warningsSaleem Abdulrasool2015-02-261-1/+2
| | | | | | | This cleans up a set of -Wsign-conversion, -Wint-conversion, and -Wformat warnings from GCC 4.9.2 on Linux. NFC. llvm-svn: 230606
* unwind: always export unw_local_addr_spaceSaleem Abdulrasool2015-02-131-5/+4
| | | | | | | | | | It seems that the remote unwinder is entirely unused at this moment. unw_local_addr_space was referencing sThisAddressSpace which use to be a static in global namespace. It has since then become a member variable of LocalAddressSpace. Update this definition and always export it (needed to implement unw_get_proc_info_by_ip for ARM). llvm-svn: 229133
* unwind: tweak inclusion ordering to work around GCCSaleem Abdulrasool2015-02-111-0/+3
| | | | | | | | | | | | | This is a slightly convoluted workaround. GCC does not support the __has_feature extension of clang, and this results in some issues with static_asserts. config.h defines static_assert as a macro with a C-specific trickery. This then propagates into the C++ headers included after config.h, which are used with C++11 mode, enabling constexpr constructors. The macro'ed static_assert does not get treated as the static_assert builtin, and will cause an error due to a non-empty constexpr constructor. Tweaking the include order permits the use of libc++ headers to build libunwind with GCC on Linux. llvm-svn: 228809
* unwind: clean up more -Wformat warningsSaleem Abdulrasool2015-02-111-3/+5
| | | | | | This makes compilation on ARM -Wformat clean with GCC. NFC. llvm-svn: 228807
* unwind: fix -Wformat warnings from gccSaleem Abdulrasool2015-02-101-14/+18
| | | | | | | Clean up the format specifiers for pedantic compilation with gcc 4.9 on Linux. NFC. llvm-svn: 228662
* Enable -Wundef.Dan Albert2015-02-051-6/+6
| | | | | | | | The problem that caused the need for http://reviews.llvm.org/D7419 was caused by testing the value of something that was undefined. This should prevent that in the future. llvm-svn: 228257
* Land support for ARM EHABI unwinding for libunwind.Nico Weber2014-06-251-3/+25
| | | | | | | | | | | This was written by: Albert Wong <ajwong@chromium.org> Antoine Labour <piman@chromium.org> Dana Jansen <danakj@chromium.org Jonathan Roelofs <jonathan@codesourcery.com> Nico Weber <thakis@chromium.org> llvm-svn: 211743
* Include stdlib.h for getenv when !NDEBUG.Joerg Sonnenberger2014-04-031-0/+1
| | | | llvm-svn: 205573
* Simplify.Joerg Sonnenberger2014-03-201-6/+1
| | | | llvm-svn: 204292
* Fix DW_CFA_GNU_args_size handling. The primary architecture using thisJoerg Sonnenberger2014-03-201-3/+0
| | | | | | | | | | | opcode is VAX. A function call pushes the number of arguments given onto the stack and "ret" will pop it automatically. The FDE of the caller contains the amount of stack space used for arguments (and possibly extra padding), so unwinding has to compensate for this when "returning" from a function. This is exactly the case when step() is done. The existing handling in unw_set_reg no longer makes sense. llvm-svn: 204290
* [unwind] Fix unw_init_remote_thread() use to void* instead of thread_t for ↵Nick Kledzik2013-10-081-4/+4
| | | | | | parameter to match other implementations llvm-svn: 192248
* libcxxabi contains the runtime support for C++. But, as some folks have Nick Kledzik2013-10-071-0/+353
realized, it is not complete. It relies on some _Unwind_* functions to be supplied by the OS. That means it cannot be ported to platforms that don’t already have an unwinder. Years ago Apple wrote its own unwinder for MacOSX and iOS. To make libcxxabi complete, Apple has decided the source code for its unwinder can be contributed to the open source LLVM libcxxabi project, with a dual licensed under LLVM and MIT license. So, I’ve spent some time cleaning up the sources to make them conform with LLVM style and to conditionalize the sources in a way that should make it easier to port to other platforms. The sources are in a separate "Unwind" directory under "src" in libcxxabi. Background: Most architectures now use "zero cost" exceptions for C++. The zero cost means there are no extra instructions executed if no exceptions are thrown. But if an exception is thrown, the runtime must consult side tables and figure out how to restore registers and "unwind" from the current stack frame to the catch clause. That ability to modify the stack frames and cause the thread to resume in a catch clause with all registers restored properly is the main purpose of the unwinder. This unwinder has two levels of API. The high level APIs are the _Unwind_* functions which the cxa_* exception functions in libcxxabi require. The low level APIs are the unw_* functions which are an interface defined by the the old HP libunwind project (which shares no code with this unwinder). llvm-svn: 192136
OpenPOWER on IntegriCloud