[PATCH] Implement ARM EHABI exception handling.

Joerg Sonnenberger joerg at britannica.bec.de
Mon May 5 13:49:12 PDT 2014


On Mon, May 05, 2014 at 05:41:29PM +0000, Logan Chien wrote:
> --- include/cxxabi.h
> +++ include/cxxabi.h
> @@ -44,6 +44,10 @@
>  extern void * __cxa_get_exception_ptr(void * exceptionObject) throw();
>  extern void * __cxa_begin_catch(void * exceptionObject) throw();
>  extern void __cxa_end_catch();
> +#if __arm__
> +extern bool __cxa_begin_cleanup(void * exceptionObject) throw();
> +extern void __cxa_end_cleanup();
> +#endif
>  extern std::type_info * __cxa_current_exception_type();
>  
>  // 2.5.4 Rethrowing Exceptions
> Index: include/unwind.h
> ===================================================================
> --- include/unwind.h
> +++ include/unwind.h
> @@ -23,8 +23,13 @@
>  #define LIBUNWIND_UNAVAIL
>  #endif
>  
> +#if !__USING_SJLJ_EXCEPTIONS__ && defined(__arm__) && !defined(__APPLE__)
> +#define LIBCXXABI_ARM_EHABI 1
> +#endif
> +
>  typedef enum {
>    _URC_NO_REASON = 0,
> +  _URC_OK = 0,
>    _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
>    _URC_FATAL_PHASE2_ERROR = 2,
>    _URC_FATAL_PHASE1_ERROR = 3,
> @@ -32,7 +37,8 @@

Just FYI, I will add __ARM_DWARF_EH__ when switching NetBSD to use
normal Itanium-ABI, so you might want to check for the lack of that as
well.

Joerg



More information about the cfe-commits mailing list