summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/Unwind/UnwindLevel1.c
Commit message (Collapse)AuthorAgeFilesLines
* libc++abi: remove the duplicated unwind contentSaleem Abdulrasool2015-04-241-534/+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: define more interfaces more oftenSaleem Abdulrasool2015-03-091-40/+36
| | | | | | | | | These are also part of the Unwind interfaces. However, their implementation is different in EHABI vs frame tables based exception handling. Always provide a definition. This partially undoes a movement change from earlier to make the handling a bit simpler rather than grouping the two implementations together. llvm-svn: 231690
* unwind: use sizeof() instead of hardcoded sizesSaleem Abdulrasool2015-02-131-6/+9
| | | | | | | | The statically allocated strings have a fixed size which can be computed using the sizeof operator rather than duplicating the allocation size which can drift. NFC. llvm-svn: 229126
* Don't use bzero() and strcpy().Ed Schouten2015-02-131-9/+12
| | | | | | | | | | Instead of bzero(), we can simply use memset(). The strcpy() calls are unneeded, as we can simply keep track of a pointer to the constant strings we are copying. Reviewed by: Jonathan Roelofs llvm-svn: 229074
* unwind: move exported APIs out of headerSaleem Abdulrasool2015-02-121-41/+72
| | | | | | | | | | | | | | | 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
* unwind: fix -Wformat warnings from gccSaleem Abdulrasool2015-02-101-64/+65
| | | | | | | 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-7/+7
| | | | | | | | | | 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
* indicate tag type in CSaleem Abdulrasool2015-02-051-7/+7
| | | | | | | 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
* Make the Unwinder -Werror clean.Dan Albert2015-01-051-24/+29
| | | | | | | Mostly just format string fixes. Tested clean on arm, x86, and x86_64 Linux. llvm-svn: 225187
* Land support for ARM EHABI unwinding for libunwind.Nico Weber2014-06-251-12/+12
| | | | | | | | | | | 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/+495
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