Usermode/libc++ - Exception handling implemented (partially)
[tpg/acess2.git] / Usermode / Libraries / libc++.so_src / cxxabi.cc
index adda291..bd35690 100644 (file)
@@ -4,8 +4,13 @@
  *
  * cxxabi.cc
  * - C++ ABI Namespace
+ * 
+ * NOTE: GCC follows the Itaniumâ„¢ C++ ABI on all platforms
+ * http://mentorembedded.github.io/cxx-abi/abi.html
+ * http://libcxxabi.llvm.org/spec.html
  */
 #include <cxxabi.h>
+#include <acess/sys.h>
 
 namespace __cxxabiv1 {
 
@@ -30,3 +35,28 @@ __vmi_class_type_info::~__vmi_class_type_info()
 
 };     // namespace __cxxabiv1
 
+extern "C" void __cxa_bad_cast ()
+{
+       _SysDebug("__cxa_bad_cast");
+       for(;;);
+       //throw ::std::bad_cast;
+}
+
+extern "C" void __cxa_bad_typeid ()
+{
+       _SysDebug("__cxa_bad_typeid");
+       for(;;);
+       //throw ::std::bad_typeid;
+}
+
+extern "C" void* __dynamic_cast(
+       const void *sub,
+       const __cxxabiv1::__class_type_info *src,
+       const __cxxabiv1::__class_type_info *dst,
+       ptrdiff_t src2dst_offset
+       )
+{
+       _SysDebug("TODO: __dynamic_cast %p %s to %s, hint=%p", sub, dst->name(), src->name(), src2dst_offset);
+       return NULL;
+}
+

UCC git Repository :: git.ucc.asn.au