This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: gcc4: throwing exception from signal handler
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 08 Jul 2010 16:48:14 +0100
- Subject: Re: gcc4: throwing exception from signal handler
- References: <346D8CF793D04BC99A972949F9555CC3@amber>
On 08/07/2010 14:01, Don Ward wrote:
> I would like to be able to catch certain signals (SIGSEGV and SIGSYS)
> and throw a C++ exception (to be caught in a try/catch construct). As a
> simple example:
> Am I misunderstanding how this should work or doing something wrong? Or
> is this a problem with Cygwin or gcc?
Throwing exceptions from a signal handler is a can of worms that requires
support from both the compiler and the C runtime. I was working on adding
this support for the distro package of gcc-4.5 before I had to go AWOL a
couple of weeks ago; it requires building the Cygwin DLL with EH tables, and
adding support in the last-chance stack unwinder in libgcc that is able to
unwind past our sigfe/sigbe stuff.
I'll be back in the Cygwin/GCC world starting next week.
cheers,
DaveK
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple