summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c
Commit message (Collapse)AuthorAgeFilesLines
* libc++abi: remove the duplicated unwind contentSaleem Abdulrasool2015-04-241-327/+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: fix -Wformat warnings from gccSaleem Abdulrasool2015-02-101-17/+15
| | | | | | | Clean up the format specifiers for pedantic compilation with gcc 4.9 on Linux. NFC. llvm-svn: 228662
* Revert "indicate tag type in C"Saleem Abdulrasool2015-02-051-2/+2
| | | | | | | | | | This reverts commit 4963ea3107a2fdfae21f7806896905f20b21ff0d. This change was wrong. The parameter type is sugared via a typedef. The errors generated may have been due to a different root cause, and should be fixed through the recent series of changes. llvm-svn: 228365
* [libcxxabi] Fix -Werror build for 32-bit non-ARM.Dan Albert2015-02-051-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* indicate tag type in CSaleem Abdulrasool2015-02-051-2/+2
| | | | | | | Mark the tag type (struct) for the _Unwind_Exception in C code. This silences a warning from clang about missing struct specifier. llvm-svn: 228356
* Force unwind frame with user-defined personality.Logan Chien2015-01-221-11/+36
| | | | | | | | | | | | | | | | | | If libcxxabi is compiled as a shared library, and the executable references the user-defined personality routines (e.g. __gxx_personality_v0), then the pointer comparison in Unwind-EHABI.cpp won't work. This is due to the fact that the PREL31 will point to the PLT stubs for the personality routines (in the executable), while the __gxx_personality_v0 symbol reference is yet another (different) PLT stub (in the libunwind.) This will cause _Unwind_Backtrace() stops to unwind the frame whenever it reaches __gxx_personality_v0(). This CL fix the problem by calling the user-defined personality routines with an undocumented API for force unwinding. llvm-svn: 226822
* Make the Unwinder -Werror clean.Dan Albert2015-01-051-4/+5
| | | | | | | Mostly just format string fixes. Tested clean on arm, x86, and x86_64 Linux. llvm-svn: 225187
* Silence warnings in libunwind.Logan Chien2014-12-211-5/+8
| | | | | | | | | | | | | | * Remove the embedded directive undefined behavior by moving the the #ifdef out of the macro arguments. [-Wembedded-directive] * Remove the local variable shadowing warning by renaming frameInfo in UnwindLevel1-gcc-ext.c. [-Wshadow] * Explicitly cast the function pointer to void pointer to avoid the comparison between function pointer and void pointer. [-Wpedantic] llvm-svn: 224690
* Correctly export _Unwind_[GS]et(GR|IP) for EHABI.Dan Albert2014-10-131-1/+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-2/+24
| | | | | | | | | | | | | | | | | | | | | | 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-4/+17
| | | | | | | | | | | 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
* libcxxabi contains the runtime support for C++. But, as some folks have Nick Kledzik2013-10-071-0/+268
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