summaryrefslogtreecommitdiff
path: root/src/cxa_personality.cpp
AgeCommit message (Collapse)Author
2017-03-30[libc++abi] Delete config.hShoaib Meenai
Summary: It's now completely empty, so we can remove it entirely. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31502 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@299129 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01[libcxxabi] Clean up macro usage.Ranjeet Singh
Convention in libcxxabi is to use !defined(FOO) not !FOO. Differential Revision: https://reviews.llvm.org/D30459 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296612 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01Fix non-reserved macro names LIBCXXABI_NORETURN and LIBCXXABI_ARM_EHABI.Eric Fiselier
This patch adds the required leading underscore to those macros. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296567 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-13arm: Fix ttype encoding assertion failure.Logan Chien
GCC 4.7 or newer emits 0x90 (indirect | pcrel) as the ttype encoding. This would hit an assertion in cxa_personality.cpp. This commit fixes the problem by relaxing the assertion. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286760 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31Wrap LIBCXXABI_USE_LLVM_UNWINDER with defined().Logan Chien
This commit fixes -Wundef by replacing: #if !LIBCXXABI_USE_LLVM_UNWINDER with: #if !defined(LIBCXXABI_USE_LLVM_UNWINDER) git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@280251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11libc++abi: make __cxa_call_unexpected visibleSaleem Abdulrasool
This may be invoked by the compiler, and needs to be made available so that the users can reference it. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@269255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-04libc++abi: fix visibility of personalitiesSaleem Abdulrasool
The personality routines need to be exposed to the users as the functions reference the personality routine to handle exceptions. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@268477 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-20EH: fix register usage for SjLjSaleem Abdulrasool
When using SjLj EH, do not use __builtin_eh_return_regno, map directly to the ID. This would work on some targets, particularly those where the non-SjLj EH personality used the same register mapping (0 -> 0, 1 -> 1). However, this is not guaranteed. Avoiding the use of the builtin enables the use of libc++ with SjLj EH on all targets. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@248108 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-12Remove include directive for the unused libunwind_ext.h.Logan Chien
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@241993 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-29libcxx: Switch to use __gnu_unwind_frame() for libunwind.Logan Chien
As a step to fix libunwind unw_step(), a new function __gnu_unwind_frame() has been introduced to libunwind, and it is required to use this function so that some libunwind internal data structure can be updated properly. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@238561 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-28libc++abi: work around layering violationSaleem Abdulrasool
This papers over a layering violation currently between libc++abi and libunwind. It reaches into the sources to get the declaration of an ABI defined function. This should allow the ARM buildbot to continue building libc++abi again. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@235965 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27libc++abi: clear up some -Wqual-cast warningsSaleem Abdulrasool
Cleans up cast qualifier warnings identified by GCC 4.9.2. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@235829 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Remove unneeded const_cast in readPointerHelper. Pointed out by jroelofsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@231852 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[libcxx] Fix PR21580 - Undefined behavior in readEncodedPointer()Eric Fiselier
Summary: This patch fixes a bug in `readEncodedPointer()` where it would read from memory that was not suitably aligned. This patch fixes it by using memcpy. Reviewers: danalbert, echristo, compnerd, mclow.lists Reviewed By: compnerd, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8179 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@231839 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05Enable -Wundef.Dan Albert
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228257 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22Fix _Unwind_Backtrace for libc++abi built with libgcc.Logan Chien
Implement an undocumented _US_FORCE_UNWIND flag for force unwinding. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226820 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22Allow libc++abi to be built without unwinder.Logan Chien
This CL adds a new compilation flags LIBCXXABI_USE_LLVM_UNWINDER to specify whether the LLVM unwinder is enabled. Besides, all unwinder-specific code are guarded with this definition. Now, libc++abi will be able to use the unwinding routine from libgcc when LIBCXXABI_USE_LLVM_UNWINDER is disabled. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226819 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-29Make _Unwind_Backtrace() work on ARM.Dan Albert
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@216730 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21Add baremetal ARM support to libcxxabi/libunwindJonathan Roelofs
http://reviews.llvm.org/D4993 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@216202 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-30Revert the LSDA change to scan_eh_tab.Logan Chien
This commit reverts the LSDA-related change in r211745. The r211745 adds a new argument to scan_eh_tab(), i.e. lsda. However, IMO, calling _Unwind_GetLanguageSpecificData() directly in scan_eh_tab() was more intuitive and reduces several function call to _Unwind_GetLanguageSpecificData() in __cxx_personality_v0(). git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@212037 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-25Update libc++abi to use the ARM EHABI unwinder from its libunwind.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@211745 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-14Fix typo in comment.Logan Chien
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@208795 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-10Implement ARM EHABI exception handling.Logan Chien
This commit implements the ARM zero-cost exception handling support for libc++abi. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@208466 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-08Fixes more incorrect #ifs for SJ/LJ exceptionsJonathan Roelofs
Replaces several `#if __arm__` with `#if __USING_SJLJ_EXCEPTIONS__`. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@208352 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-23Fixes incorrect #ifs for SJ/LJ exceptionsDan Albert
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@206941 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-12[libcxxabi] Fix broken codesourcery.com links in commentsJonathan Roelofs
review: http://llvm-reviews.chandlerc.com/D2718 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@201208 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-15Bruce Mitchener: Typo fixes.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@175275 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-12Wen-Han Gu: Fix for http://llvm.org/bugs/show_bug.cgi?id=14312 Exception ↵Howard Hinnant
Table out-of-range but still keep walking. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@167733 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-17Arm fixes in cxa_personality.cpp and a little refactoring.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@152966 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-09Enable / silence -Wunused-parameter.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@152415 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-08Enable/silence -Wunused-variable.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@152329 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-08Enable/silence -Wconversion.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@152328 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-08Enable/silence -Wsign-conversion.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@152323 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29First attempt at arm support.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@151765 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17Remove outdated information from comment.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@150827 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01Treat all exceptions except that the ones that this library throws as ↵Howard Hinnant
foreign. Even other C++ exceptions. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149518 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01Nothing but polishing comments.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149515 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01Move an error detector to a better place.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149513 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31Back the optimization down from -O3 to -Os. I'm getting an unexplained ↵Howard Hinnant
crasher on -O3. I've looked for a libc++abi bug and can't find one. I'm suspecting clang optimizer bug. But I don't have a good test case at the moment. Deferring investigation on this for now as I will soon be developing more and smaller tests. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149414 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31Fix type-o in the comment of the last commitHoward Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149403 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31Found and fixed a bug in __cxa_call_unexpected. If the unexpected_handler ↵Howard Hinnant
rethrows the same exception then needed information gets overwritten in the original exception header. Therefore save it locally before executing the unexpected_handler. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149400 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31Found and fixed bug in personality function: Don't dive into the action ↵Howard Hinnant
table if the action entry is zero. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149389 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31Minor bug fix in __cxa_call_unexpected. Changed std::terminate to detect a ↵Howard Hinnant
caught-but-unhandled exception, and choose the handler out of that if found. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149329 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Refactored personality function. Found one bug in scanning exception spec ↵Howard Hinnant
lists. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149272 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Add a descriptive name for a constant. Also I'm at least temporarily waging ↵Howard Hinnant
war on throw specs, both old and new style. Except where we have already publicly exposed the throw spec, I'm getting rid of them. They may come back later. But they seem somewhat prone to cyclic dependencies here. The throw spec implies compiler generated code that this library has to jump to during stack unwinding. I'd like to minimize the possiblity that the code used to properly make that jump is itself creating such jumps. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149251 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-28Sometimes it takes all day to write a decent comment. This is one of those ↵Howard Hinnant
times, and I'm still not quite sure I have them correct. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149154 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-24Forgot to include this file in the last commit: Move kOurExceptionClass and ↵Howard Hinnant
kOurDependentExceptionClass from source to header so that they can be used in multiple sources. This is a private header, these constants are not publicly exposed. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@148829 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-22Getting started on matching a thrown exception to a catch clause, and ↵Howard Hinnant
setting the adjusted pointer to the caught object appearing in the catch clause. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@148666 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-22I kept getting confused among the __cxa_exception*, the _Unwind_Exception* ↵Howard Hinnant
and the void* to the thrown object. So I've gone through these two files and attempted to institute a consistent variable naming scheme, and in a few instances, turned void* into a concrete* to have the type system help me out. No change in functionality for this commit is intended. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@148663 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-08First brush with testing __gxx_personality_v0 reveals there is still a long ↵Howard Hinnant
way to go. But my understanding of what it is supposed to do continues to improve. I am currently contemplating whether I need to implement typeinfo before completing __gxx_personality_v0 in order to get matching catch handlers correct. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@147761 91177308-0d34-0410-b5e6-96231b3b80d8