Partially revert patch from 2014-03-04.
* exception.h (exception::handler_installed): Declare. (exception::exception): Install vectored exception handler on x86_64. (exception::~exception): Remove for x86_64. * exceptions.cc (exception::handler_installed): Define.
This commit is contained in:
parent
4f0b5a097d
commit
8c0389d330
|
@ -1,3 +1,11 @@
|
||||||
|
2014-03-18 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
Partially revert patch from 2014-03-04.
|
||||||
|
* exception.h (exception::handler_installed): Declare.
|
||||||
|
(exception::exception): Install vectored exception handler on x86_64.
|
||||||
|
(exception::~exception): Remove for x86_64.
|
||||||
|
* exceptions.cc (exception::handler_installed): Define.
|
||||||
|
|
||||||
2014-03-17 Christopher Faylor <me.cygwin2014@cgf.cx>
|
2014-03-17 Christopher Faylor <me.cygwin2014@cgf.cx>
|
||||||
|
|
||||||
* sigproc.h (no_thread_exit_protect): New class.
|
* sigproc.h (no_thread_exit_protect): New class.
|
||||||
|
|
|
@ -109,6 +109,7 @@ extern exception_list *_except_list asm ("%fs:0");
|
||||||
class exception
|
class exception
|
||||||
{
|
{
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
|
static bool handler_installed;
|
||||||
static int handle (LPEXCEPTION_POINTERS);
|
static int handle (LPEXCEPTION_POINTERS);
|
||||||
#else
|
#else
|
||||||
exception_list el;
|
exception_list el;
|
||||||
|
@ -119,16 +120,11 @@ public:
|
||||||
exception () __attribute__ ((always_inline))
|
exception () __attribute__ ((always_inline))
|
||||||
{
|
{
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
/* Manually install SEH handler. */
|
if (!handler_installed)
|
||||||
asm (".l_startframe: \n\
|
{
|
||||||
.seh_handler __C_specific_handler, @except \n\
|
handler_installed = true;
|
||||||
.seh_handlerdata \n\
|
AddVectoredExceptionHandler (1, handle);
|
||||||
.long 1 \n\
|
}
|
||||||
.rva .l_startframe, \
|
|
||||||
.l_endframe, \
|
|
||||||
_ZN9exception6handleEP19_EXCEPTION_POINTERS, \
|
|
||||||
.l_endframe \n\
|
|
||||||
.text \n");
|
|
||||||
#else
|
#else
|
||||||
save = _except_list;
|
save = _except_list;
|
||||||
el.handler = handle;
|
el.handler = handle;
|
||||||
|
@ -136,13 +132,7 @@ public:
|
||||||
_except_list = ⪙
|
_except_list = ⪙
|
||||||
#endif /* __x86_64__ */
|
#endif /* __x86_64__ */
|
||||||
};
|
};
|
||||||
#ifdef __x86_64__
|
#ifndef __x86_64__
|
||||||
~exception () __attribute__ ((always_inline)) {
|
|
||||||
asm (" nop \n\
|
|
||||||
.l_endframe: \n\
|
|
||||||
nop \n");
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
~exception () __attribute__ ((always_inline)) { _except_list = save; }
|
~exception () __attribute__ ((always_inline)) { _except_list = save; }
|
||||||
#endif /* !__x86_64__ */
|
#endif /* !__x86_64__ */
|
||||||
};
|
};
|
||||||
|
|
|
@ -553,6 +553,8 @@ rtl_unwind (exception_list *frame, PEXCEPTION_RECORD e)
|
||||||
#define CYG_EXC_CONTINUE_EXECUTION EXCEPTION_CONTINUE_EXECUTION
|
#define CYG_EXC_CONTINUE_EXECUTION EXCEPTION_CONTINUE_EXECUTION
|
||||||
#define CYG_EXC_CONTINUE_SEARCH EXCEPTION_CONTINUE_SEARCH
|
#define CYG_EXC_CONTINUE_SEARCH EXCEPTION_CONTINUE_SEARCH
|
||||||
|
|
||||||
|
bool exception::handler_installed NO_COPY;
|
||||||
|
|
||||||
int
|
int
|
||||||
exception::handle (LPEXCEPTION_POINTERS ep)
|
exception::handle (LPEXCEPTION_POINTERS ep)
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue