C++ Exception Support: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
Mention LIBCXXRT_WEAK_LOCKS as a way to workaround the pthread |
→Rolling your own: Added the macro approach for us VC nuts. |
||
Line 32: | Line 32: | ||
The functions you'll need to implement all start with `__cxa_` and are documented in the Itanium C++ ABI (which is also used for x86 by GCC) |
The functions you'll need to implement all start with `__cxa_` and are documented in the Itanium C++ ABI (which is also used for x86 by GCC) |
||
You will also need to implement `__gxx_personality_v0` (which according to the clang docs, is the de-facto standard for C++), the structures used by this function to know what to do are documented in [http://mentorembedded.github.io/cxx-abi/exceptions.pdf this] PDF. |
You will also need to implement `__gxx_personality_v0` (which according to the clang docs, is the de-facto standard for C++), the structures used by this function to know what to do are documented in [http://mentorembedded.github.io/cxx-abi/exceptions.pdf this] PDF. |
||
It is also possible to create macros that implement exception-like control structures (especially useful if you use visual C++). You can implement exceptions with nothing more than setjmp and a linked list. However, you will need to create an exception class that all exceptions derive from, which implements some form of basic RTTI. |
|||
=Function stubs= |
=Function stubs= |