From: Kai Tietz <ktietz70@googlemail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [patch libgcc]: Fix PR target/55445 Always defined __SEH__ when build from trunk
Date: Sun, 25 Nov 2012 15:39:00 -0000 [thread overview]
Message-ID: <CAEwic4b=e6wycoQXnb8P_L8FoEpfx4wyyCkhMCZGw=zZAV++4g@mail.gmail.com> (raw)
Hi,
the issue here is that the predefined macro __SEH__ does just indicate
that SEH-infrastructure is present. It doesn't mean that SEH is used
as exception-mechansim. Therefore the checks in libgcc's (and as
followup in libstdc++'s) eh exception-mechansim for SEH were not
regarding that there might SjLj enabled instead.
ChangeLog
2012-11-25 Kai Tietz
PR target/55445
* unwind-c (__SEH__): Make sure SjLj isn't
active.
* unwind-generic.h: Likewise.
* unwind-seh.c: Likewise.
Tested for multilib i686-w64-mingw32, and x86_64-w64-mingw32. Ok for apply?
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__) */
next reply other threads:[~2012-11-25 15:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-25 15:39 Kai Tietz [this message]
2012-11-28 18:01 ` Kai Tietz
2012-11-28 18:31 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEwic4b=e6wycoQXnb8P_L8FoEpfx4wyyCkhMCZGw=zZAV++4g@mail.gmail.com' \
--to=ktietz70@googlemail.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).