summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/Unwind/UnwindCursor.hpp
Commit message (Collapse)AuthorAgeFilesLines
* libc++abi: remove the duplicated unwind contentSaleem Abdulrasool2015-04-241-1317/+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
* Add .eh_frame_hdr search to Linux unwinder.Dan Albert2015-02-271-2/+4
| | | | | | | | | | | This improves the performance of unwinding on DWARF based targets. The 32-bit x86 support for scanning the full eh_frame (CFI_Parser::findFDE) apparently does not work (at least not on Linux). Since the eh_frame_hdr code delegates to that, this still doesn't work for x86 Linux, but it has been tested on x86_64 Linux and aarch64 Android. llvm-svn: 230802
* unwind: silence -Wconversion warningsSaleem Abdulrasool2015-02-111-2/+2
| | | | | | Clean up implicit uint8_t to uint32_t conversion warnings identified by GCC. llvm-svn: 228805
* unwind: clean up some stray semicolonsSaleem Abdulrasool2015-02-101-1/+1
| | | | | | Clean up some stray semicolons found by GCC 4.9 -Wpedantic. NFC. llvm-svn: 228664
* Unwind: hoist placement delete into base classSaleem Abdulrasool2015-02-061-2/+4
| | | | | | | | | | Move the placement delete into the base class. This permits the proper emission of the virtual destructor in UnwindCursor by using the class specific placement delete instead of the normal single element ::operator delete. With this patch, we can finally build libunwind as a DSO without a runtime dependency on libc++/libc++abi. llvm-svn: 228436
* Unwind: replace pure virtual functions with abortsSaleem Abdulrasool2015-02-061-17/+33
| | | | | | | | | | | | Convert all pure virtual functions in the UnwindCursor with implementations that abort. This is effectively manually replicating the current behaviour, whilst removing the compiler generated calls to __cxa_pure_virtual, which will abort at runtime with a message indicating that a pure virtual call was made. The whitespace changes are the result of executing clang-format over the changed region. llvm-svn: 228423
* [libcxxabi] Fix -Werror build for 32-bit non-ARM.Dan Albert2015-02-051-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Enable -Wundef.Dan Albert2015-02-051-8/+8
| | | | | | | | 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
* Force unwind frame with user-defined personality.Logan Chien2015-01-221-14/+4
| | | | | | | | | | | | | | | | | | 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
* 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
* Land support for ARM EHABI unwinding for libunwind.Nico Weber2014-06-251-12/+252
| | | | | | | | | | | 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
* Properly sign extend delta in compact unwind infoNick Kledzik2014-04-251-2/+3
| | | | llvm-svn: 207170
* Fix virtual class with non-virtual dtor complaintDan Albert2014-04-231-0/+1
| | | | | | | Fixes compiler complaint about: src/Unwind/UnwindCursor.hpp:366:25: error: 'libunwind::AbstractUnwindCursor' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor] llvm-svn: 206942
* Properly conditionalize DwarfFDECache<A>::dyldUnloadHook. Patch by Patrick WildtNick Kledzik2014-04-121-0/+2
| | | | llvm-svn: 206121
* Fix DW_CFA_GNU_args_size handling. The primary architecture using thisJoerg Sonnenberger2014-03-201-0/+2
| | | | | | | | | | | 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-3/+8
| | | | | | 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/+1058
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