summaryrefslogtreecommitdiffstats
path: root/libcxxabi/include/unwind.h
Commit message (Collapse)AuthorAgeFilesLines
* libc++abi: remove the duplicated unwind contentSaleem Abdulrasool2015-04-241-329/+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: move exported APIs out of headerSaleem Abdulrasool2015-02-121-25/+1
| | | | | | | | | | | | | | | Ideally, we would do something like inline __declspec(dllexport) to ensure that the symbol was inlined within libunwind as well as emitted into the final DSO. This simply moves the definition out of the header to ensure that the *public* interfaces are defined and exported into the final DSO. This change also has "gratuitous" code movement so that the EHABI and generic implementations are co-located making it easier to find them. The movement from the header has one minor change introduced into the code: additional tracing to mirror the behaviour of the non-EHABI interfaces. llvm-svn: 228903
* [libcxxabi] Fix -Werror build for 32-bit non-ARM.Dan Albert2015-02-051-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The inclusion of Unwind-EHABI.h was insufficiently guarded (LIBCXXABI_ARM_EHABI was beign checked without ever being defined). Move the check into the header file itself, add the check to the source file, and clean up the existing checks. LIBCXXABI_ARM_EHABI didn't have a canonical defintion; it was duplicated across cxxabi.h, libunwind.h, and unwind.h. Move the definition into __cxxabi_config.h and clean up the old cruft (note: we will have to ship this header). There are also a few drive-by formatting/whitespace cleanups. Reviewers: jroelofs, thakis, compnerd Reviewed By: compnerd Subscribers: compnerd, aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D7419 llvm-svn: 228363
* Some more -Wundef issues.Dan Albert2015-02-051-1/+1
| | | | | | This should be all of them for Linux. Might be some for the others. llvm-svn: 228267
* Enable -Wundef.Dan Albert2015-02-051-4/+4
| | | | | | | | 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
* Whitespace cleanup.Dan Albert2015-02-041-9/+9
| | | | llvm-svn: 228195
* Fix _Unwind_Backtrace for libc++abi built with libgcc.Logan Chien2015-01-221-0/+2
| | | | | | | Implement an undocumented _US_FORCE_UNWIND flag for force unwinding. llvm-svn: 226820
* Remove _Unwind_{Get,Set}{GR,IP} from ARM EHABI build.Logan Chien2015-01-221-0/+26
| | | | | | | | | | | | | This commit partially reverts r219629. This functions are not a part of ARM EHABI specification, and AFAIK, the de facto implementation does not export these functions. Without this change, any programs compiled with this unwind.h will be incompatible with other implementations due to linkage error. llvm-svn: 226818
* Correctly export _Unwind_[GS]et(GR|IP) for EHABI.Dan Albert2014-10-131-25/+1
| | | | | | | | | | | | | | | | | | These need to have normal linkage instead of being static inline as many libraries expect to be able to declare these and have the linker find them rather than needing to include the header. http://mentorembedded.github.io/cxx-abi/abi-eh.html Also clean up some warnings while I'm here. Reviewers: jroelofs, kledzik Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5754 llvm-svn: 219629
* Make _Unwind_Backtrace() work on ARM.Dan Albert2014-08-291-4/+0
| | | | | | | | | | | | | | | | | | | | | | Summary: Since the personality functions do the actual unwinding on ARM, and will also stop unwinding when they encounter a handler, we invoke _Unwind_VRS_Interpret() directly form _Unwind_Backtrace(). To simplify, the logic for decoding an EHT is moved out of unwindOneFrame() and into its own function, decode_eht_entry(). Unlike unwindOneFrame(), which could only handle ARM's compact personality function entries (section 6.3) decode_eht_entry() can handle the generic entries (section 6.2). Reviewers: jroelofs Reviewed By: jroelofs Subscribers: piman, aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D5112 llvm-svn: 216730
* Land support for ARM EHABI unwinding for libunwind.Nico Weber2014-06-251-20/+34
| | | | | | | | | | | 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
* Start landing support for ARM EHABI unwinding.Nico Weber2014-06-251-0/+3
| | | | | | | | The new code will be behind a LIBCXXABI_ARM_EHABI define (so that platforms that don't want it can continue using e.g. SJLJ). This commit mostly just adds the LIBCXXABI_ARM_EHABI define. llvm-svn: 211739
* Implement ARM EHABI exception handling.Logan Chien2014-05-101-13/+140
| | | | | | | This commit implements the ARM zero-cost exception handling support for libc++abi. llvm-svn: 208466
* Fixes more incorrect #ifs for SJ/LJ exceptionsJonathan Roelofs2014-05-081-3/+3
| | | | | | Replaces several `#if __arm__` with `#if __USING_SJLJ_EXCEPTIONS__`. llvm-svn: 208352
* Fixes incorrect #ifs for SJ/LJ exceptionsDan Albert2014-04-231-1/+1
| | | | | | | The was working because, given __APPLE__, _LIBUNWIND_BUILD_SJLJ_APIS was set to __arm__, but other ARM targets not using SJ/LJ will fail to compile. llvm-svn: 206941
* Rename LIBUNWIND_AVAIL to LIBUNWIND_UNAVAIL so as to not conflict with other ↵Nick Kledzik2013-11-011-11/+11
| | | | | | (different) LIBUNWIND_AVAIL define llvm-svn: 193839
* unwinder: conditionalise availabilitySaleem Abdulrasool2013-10-171-9/+15
| | | | | | | | __attribute__ (( unavailable )) is for Apple specific builds. Create a macro to conditionalise the usage of the macro. This is to aid in porting the unwinder to other platforms. llvm-svn: 192868
* libcxxabi contains the runtime support for C++. But, as some folks have Nick Kledzik2013-10-071-0/+211
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