summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoranonymous <local@localhost>2010-10-04 11:35:39 +0700
committeranonymous <local@localhost>2010-10-04 11:35:39 +0700
commite6a523d6eb2ee53a399da43b55f5b4e1bd7810ec (patch)
treed88b7daa2d7fbdff3d9f48a9c56148193a0adba7 /src
parente34781fc2d3165dff329a48fba4ac8e21e36c748 (diff)
downloadlibcxxrt-e6a523d6eb2ee53a399da43b55f5b4e1bd7810ec.tar.gz
libcxxrt-e6a523d6eb2ee53a399da43b55f5b4e1bd7810ec.tar.bz2
libcxxrt-e6a523d6eb2ee53a399da43b55f5b4e1bd7810ec.tar.xz
__cxa_get_exception_ptr implementation
Diffstat (limited to 'src')
-rw-r--r--src/exception.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/exception.cc b/src/exception.cc
index 272bf30..e0d32da 100644
--- a/src/exception.cc
+++ b/src/exception.cc
@@ -901,6 +901,16 @@ extern "C" void __cxa_call_unexpected(void*exception)
abort();
}
+/**
+ * ABI function, returns the adjusted pointer to the exception object.
+ */
+extern "C" void *__cxa_get_exception_ptr(void *exceptionObject) {
+ // exceptionObject is the pointer to the _Unwind_Exception within the
+ // __cxa_exception. The throw object is after this
+ return ((char*)exceptionObject + sizeof(_Unwind_Exception));
+}
+
+
namespace std
{
unexpected_handler set_unexpected(unexpected_handler f) throw()