+2007-06-13 Richard Earnshaw <rearnsha@arm.com>
+
+ * libsupc++/eh_arm.cc (__cxa_type_match): Handle foreign
+ exceptions.
+ * libsubpc++/eh_personality.cc: Don't try to set up foreign or
+ forced unwind types here when using the ARM EABI unwinder.
+
2007-06-13 Paolo Carlini <pcarlini@suse.de>
* include/c_global/cmath: Tweak includes.
bool is_reference __attribute__((__unused__)),
void** thrown_ptr_p)
{
- if (!__is_gxx_exception_class(ue_header->exception_class))
- return ctm_failed;
-
+ bool foreign_exception = !__is_gxx_exception_class(ue_header->exception_class);
__cxa_exception* xh = __get_exception_header_from_ue(ue_header);
- const std::type_info* throw_type = xh->exceptionType;
+ const std::type_info* throw_type;
+
+ // XXX What to do with forced unwind?
+ if (foreign_exception)
+ throw_type = &typeid(abi::__foreign_exception);
+ else
+ throw_type = xh->exceptionType;
+
void* thrown_ptr = *thrown_ptr_p;
// Pointer types need to adjust the actual pointer, not
bool saw_cleanup = false;
bool saw_handler = false;
+#ifdef __ARM_EABI_UNWINDER__
+ throw_type = ue_header;
+ if ((actions & _UA_FORCE_UNWIND)
+ || foreign_exception)
+ thrown_ptr = 0;
+#else
// During forced unwinding, match a magic exception type.
if (actions & _UA_FORCE_UNWIND)
{
thrown_ptr = 0;
}
else
-#ifdef __ARM_EABI_UNWINDER__
- throw_type = ue_header;
-#else
throw_type = xh->exceptionType;
#endif