2012/11/22 niXman <[email protected]>:
> 2012/11/22 Kai Tietz:
>> Well, __SEH__ is defined for x64 in any case. There is no way to have
>> for x64 no SEH-support - at least not in a way it would work in a
>> general way, as SEH is part of the ABI of x64.
> I.e. SJLJ can't be used for 4.8(and later)-x86_64?
>
>> I am about to setup a build for testing this.
> Thanks in advance.
>
>
> --
> Regards,
> niXman
So, I think I found the issue about SEH and SJLJ ... it is reasoned by
the fact that __SEH__ is used in libgcc's unwinder, but it didn't
checked if SJLJ should be used.
The following patch should solve this issue. Could you give it a try?
Regards,
Kai
Index: unwind-c.c
===================================================================
--- unwind-c.c (Revision 193669)
+++ unwind-c.c (Arbeitskopie)
@@ -109,7 +109,7 @@
struct _Unwind_Exception * ue_header,
struct _Unwind_Context * context)
#else
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
static
#endif
_Unwind_Reason_Code
@@ -233,7 +233,7 @@
return _URC_INSTALL_CONTEXT;
}
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
EXCEPTION_DISPOSITION
__gcc_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame,
PCONTEXT ms_orig_context, PDISPATCHER_CONTEXT ms_disp)
Index: unwind-generic.h
===================================================================
--- unwind-generic.h (Revision 193669)
+++ unwind-generic.h (Arbeitskopie)
@@ -28,7 +28,7 @@
#ifndef _UNWIND_H
#define _UNWIND_H
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
/* Only for _GCC_specific_handler. */
#include <windows.h>
#endif
@@ -275,7 +275,7 @@
# error "What type shall we use for _sleb128_t?"
#endif
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
/* Handles the mapping from SEH to GCC interfaces. */
EXCEPTION_DISPOSITION _GCC_specific_handler (PEXCEPTION_RECORD, void *,
PCONTEXT, PDISPATCHER_CONTEXT,
Index: unwind-seh.c
===================================================================
--- unwind-seh.c (Revision 193669)
+++ unwind-seh.c (Arbeitskopie)
@@ -28,7 +28,7 @@
#include "tm.h"
#include "unwind.h"
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
/* At the moment everything is written for x64, but in theory this could
also be used for i386, arm, mips and other extant embedded Windows. */
@@ -480,4 +480,4 @@
return _URC_END_OF_STACK;
#endif
}
-#endif /* __SEH__ */
+#endif /* __SEH__ && !defined (__USING_SJLJ_EXCEPTIONS__) */