www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/07/09/12:52:10

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 9 Jul 2010 12:51:57 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: gcc4: throwing exception from signal handler
Message-ID: <20100709165157.GA25913@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <346D8CF793D04BC99A972949F9555CC3 AT amber> <4C35F33E DOT 60603 AT gmail DOT com> <011255E943B4494AB62D316E4532BE99 AT amber>
MIME-Version: 1.0
In-Reply-To: <011255E943B4494AB62D316E4532BE99@amber>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Thu, Jul 08, 2010 at 01:02:28PM -0400, Don Ward wrote:
>Dave Korn wrote:
>
>> 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.
>
>Understood!
>
>>  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'm glad someone is (or will be) working on it.  In the meanwhile, I can 
>make do with gcc 3.4.4.

Someone may be looking into this but if this is adding complication to the signal
handler it is going to take some real convincing that it should go into the DLL.

Dave, this is something that you should be talking about early rather than springing
it as a patch in cygwin-patches.

cgf

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019