summaryrefslogtreecommitdiffstats
path: root/libcxxabi
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not add -fno-exceptions without -funwind-tablesSergey Dmitrouk2015-02-161-2/+9
| | | | | | | | | | | | | | | Adding just -fno-exceptions breaks libunwind in quite mysterious way when it's there, but exception handling doesn't work because of dummy unwind tables. Also as using exceptions implies references to symbols defined in libcxx, abort build of libcxxabi as shared library if we have to keep exceptions (when compiler supports -fno-exceptions, but not -funwind-tables; one example would be a cross-compiler, in which case testing for -funwind-tables flag by CMake actually requires libunwind to be available before it's built). llvm-svn: 229427
* Moar post-commit review.Jonathan Roelofs2015-02-141-1/+1
| | | | | | Apparently typing is hard. llvm-svn: 229216
* Address post-commit review commentsJonathan Roelofs2015-02-141-0/+3
| | | | llvm-svn: 229207
* Make the unwinder build on thumbv6-m with the integrated assembler.Jonathan Roelofs2015-02-141-0/+4
| | | | | | http://reviews.llvm.org/D7630 llvm-svn: 229194
* unwind: always export unw_local_addr_spaceSaleem Abdulrasool2015-02-132-6/+6
| | | | | | | | | | It seems that the remote unwinder is entirely unused at this moment. unw_local_addr_space was referencing sThisAddressSpace which use to be a static in global namespace. It has since then become a member variable of LocalAddressSpace. Update this definition and always export it (needed to implement unw_get_proc_info_by_ip for ARM). llvm-svn: 229133
* unwind: use sizeof() instead of hardcoded sizesSaleem Abdulrasool2015-02-132-10/+15
| | | | | | | | 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-133-16/+21
| | | | | | | | | | 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: use explicit memcpy for register savingSaleem Abdulrasool2015-02-121-6/+19
| | | | | | | | | | Convert the register saving code to use an explicit memcpy rather than the implicit memcpy from the assignment. This avoids warnings from -Wcast-qual on GCC and makes the code more explicit. Furthermore, use sizeof to calculate the offsets rather than adding magic numbers, improving legibility of the code. NFC. llvm-svn: 228904
* unwind: move exported APIs out of headerSaleem Abdulrasool2015-02-122-66/+73
| | | | | | | | | | | | | | | 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: tweak inclusion ordering to work around GCCSaleem Abdulrasool2015-02-112-0/+5
| | | | | | | | | | | | | This is a slightly convoluted workaround. GCC does not support the __has_feature extension of clang, and this results in some issues with static_asserts. config.h defines static_assert as a macro with a C-specific trickery. This then propagates into the C++ headers included after config.h, which are used with C++11 mode, enabling constexpr constructors. The macro'ed static_assert does not get treated as the static_assert builtin, and will cause an error due to a non-empty constexpr constructor. Tweaking the include order permits the use of libc++ headers to build libunwind with GCC on Linux. llvm-svn: 228809
* unwind: clean up some -Werror=return-type warningsSaleem Abdulrasool2015-02-111-17/+16
| | | | | | | | Mark that the functions always return or abort if the register class is unhandled. Avoid placing the abort in the switch to permit -Wswitch-cover to catch missing values. llvm-svn: 228808
* unwind: clean up more -Wformat warningsSaleem Abdulrasool2015-02-112-46/+56
| | | | | | This makes compilation on ARM -Wformat clean with GCC. NFC. llvm-svn: 228807
* unwind: clean up straggling -Wundef warningSaleem Abdulrasool2015-02-111-0/+4
| | | | | | | Conservatively define __ARM_ARCH to 4 in the case that it is undefined (e.g. with GCC). llvm-svn: 228806
* unwind: silence -Wconversion warningsSaleem Abdulrasool2015-02-112-6/+8
| | | | | | Clean up implicit uint8_t to uint32_t conversion warnings identified by GCC. llvm-svn: 228805
* Fix libcxxabi's library and object root for tests.Eric Fiselier2015-02-113-9/+14
| | | | llvm-svn: 228779
* unwind: improve compilation on Linux with gccSaleem Abdulrasool2015-02-101-23/+24
| | | | | | | | gcc still defaults to C89 which does not support BCPL style comments. This splits up the sources list in CMakeLists and selectively adds compile flags for using C99 which avoids a number of warnings in -Wpedantic mode. NFC. llvm-svn: 228665
* unwind: clean up some stray semicolonsSaleem Abdulrasool2015-02-102-2/+2
| | | | | | Clean up some stray semicolons found by GCC 4.9 -Wpedantic. NFC. llvm-svn: 228664
* unwind: clean up -Wundef warningsSaleem Abdulrasool2015-02-102-14/+14
| | | | | | | | The unified register management interfaces had multiple naked macros for conditional logic. This cleans them up to use the defined() form, avoiding -Wundef warnings. NFC. llvm-svn: 228663
* unwind: fix -Wformat warnings from gccSaleem Abdulrasool2015-02-103-95/+98
| | | | | | | Clean up the format specifiers for pedantic compilation with gcc 4.9 on Linux. NFC. llvm-svn: 228662
* 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
* unwind: use -fno-rtti -fno-exceptions -funwind-tablesSaleem Abdulrasool2015-02-062-1/+9
| | | | | | | | | RTTI and exceptions are not needed for the unwinder, the use of C++ there is for very specific cases, and does not require dynamic_cast nor does it use exceptions. This avoids unnecessary references to type information being emitted. llvm-svn: 228408
* Fix build for apple machines.Matthias Braun2015-02-061-2/+2
| | | | | | | HAVE_CRASHREPORTERCLIENT_H was potentially undefined and -Wundef is enabled now. llvm-svn: 228368
* Fix build.Dan Albert2015-02-061-2/+0
| | | | | | Had a bad rebase that merged the #if in two places. Whoops. llvm-svn: 228366
* Revert "indicate tag type in C"Saleem Abdulrasool2015-02-052-9/+9
| | | | | | | | | | 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-058-39/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Formatting fixes.Dan Albert2015-02-053-36/+34
| | | | | | | We should clang-format the whole thing when we finally move the unwinder to its new home. llvm-svn: 228360
* Fix compilation of unwind on Darwin-x86_64Saleem Abdulrasool2015-02-051-0/+4
| | | | | | | | EHABI related typedef sugar is gated via LIBCXXABI_ARM_EHABI which did not protect the EHABI header. This would cause declarations to be emitted on non-EHABI targets, resulting in errors. This permits compilation on Darwin. llvm-svn: 228359
* Silence some -Wundef warningsSaleem Abdulrasool2015-02-052-4/+4
| | | | | | | | | | | | config.h:53:7: warning 'FOR_DYLD' is not defined, evaluates to 0 [-Wundef] Unwind_AppleExtras.cpp:44:5: warning '__arm__' is not defined, evaluates to 0 [-Wundef] Unwind_AppleExtras.cpp:60:7: warning '__arm64__' is not defined, evaluates to 0 [-Wundef] Unwind_AppleExtras.cpp:186:6: warning 'FOR_DYLD' is not defined, evaluates to 0 [-Wundef] Use defined(macro) which should be equivalent in these cases, silencing -Wundef warnings. NFC. llvm-svn: 228358
* Silence warning about loss of precisionSaleem Abdulrasool2015-02-051-1/+1
| | | | | | | | | | Explicitly cast to uintptr_t before casting to a 32-bit value. Because this code path is meant to be used in a 32-bit address space, this truncation should be safe. Unwind-EHABI.h:25:12: error: cast from pointer to smaller type 'uint32_t' (aka 'unsigned int') loses information llvm-svn: 228357
* indicate tag type in CSaleem Abdulrasool2015-02-052-9/+9
| | | | | | | 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
* Install header filesGreg Fitzgerald2015-02-051-0/+7
| | | | llvm-svn: 228351
* Some more -Wundef issues.Dan Albert2015-02-053-8/+8
| | | | | | This should be all of them for Linux. Might be some for the others. llvm-svn: 228267
* Enable -Wundef.Dan Albert2015-02-0516-62/+71
| | | | | | | | 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-042-63/+55
| | | | llvm-svn: 228195
* Make test require 'linux' instead of 'linux2'Eric Fiselier2015-02-031-1/+1
| | | | llvm-svn: 228073
* Adopt CMake policy CMP0042. Set MACOSX_RPATH on by default.Eric Fiselier2015-01-261-0/+4
| | | | llvm-svn: 227142
* [libcxxabi] Teach CMake better ways to find the libc++ source directory (and ↵Eric Fiselier2015-01-226-48/+114
| | | | | | | | | | | | | | | | | | | | | | misc cleanup). Summary: The main section of this patch teaches CMake a new option `LIBCXXABI_LIBCXX_PATH` that specifies the path to the libcxx source root. This information is passed to lit so that it can better find libc++'s python module. `LIBCXXABI_LIBCXX_PATH` is also used to help find the libc++ headers. The rest of this patch is misc cleanup, mostly to make pep8 and pylint happy. I've also copied libc++'s .gitignore into libc++abi. Reviewers: jroelofs, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7130 llvm-svn: 226855
* Enable backtrace_test for ARM.Logan Chien2015-01-221-1/+0
| | | | llvm-svn: 226824
* Add -funwind-tables to CMAKE_C_FLAGS.Logan Chien2015-01-222-0/+6
| | | | | | | | Without -funwind-tables, the compiler won't generate the unwinding table for these C functions. However, the functions in libunwind, such as `_Unwind_Backtrace()`, WILL unwind stack to get the backtrace. llvm-svn: 226823
* Force unwind frame with user-defined personality.Logan Chien2015-01-224-69/+109
| | | | | | | | | | | | | | | | | | 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
* Fix _Unwind_Backtrace for libc++abi built with libgcc.Logan Chien2015-01-222-0/+14
| | | | | | | Implement an undocumented _US_FORCE_UNWIND flag for force unwinding. llvm-svn: 226820
* Allow libc++abi to be built without unwinder.Logan Chien2015-01-222-34/+46
| | | | | | | | | | | 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. llvm-svn: 226819
* Remove _Unwind_{Get,Set}{GR,IP} from ARM EHABI build.Logan Chien2015-01-222-22/+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
* Merge libc++abi's lit configuration with libc++'sJonathan Roelofs2015-01-216-288/+133
| | | | | | http://reviews.llvm.org/D6985 llvm-svn: 226737
* Rename all of the tests in preparation for merging lit configs with libcxxJonathan Roelofs2015-01-2140-1/+1
| | | | | | http://reviews.llvm.org/D7101 llvm-svn: 226691
* Fix abort_message.cpp for the NDK.Dan Albert2015-01-161-3/+15
| | | | | | | | | The NDK doesn't have access to `android/set_abort_message.h`, so use an extern declaration instead for API 21. For older releases, just use `__assert2`, which will report to logcat and/or the tombstone for some older releases. llvm-svn: 226310
* LIBCXXABI_TARGET_TRIPLE won't always be set.Dan Albert2015-01-161-1/+2
| | | | | | | Fixes issue with r226235. Build configuration difference between libc++ and libc++abi. llvm-svn: 226240
* [libc++abi] Add support for cross compiling.Dan Albert2015-01-161-0/+7
| | | | | | | | | | | | Reviewers: EricWF, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6991 llvm-svn: 226235
* Update PACKAGE_VERSION to 3.7.0svnHans Wennborg2015-01-141-1/+1
| | | | llvm-svn: 226014
OpenPOWER on IntegriCloud