X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Message-ID: <011255E943B4494AB62D316E4532BE99@amber> From: "Don Ward" To: References: <346D8CF793D04BC99A972949F9555CC3 AT amber> <4C35F33E DOT 60603 AT gmail DOT com> Subject: Re: gcc4: throwing exception from signal handler Date: Thu, 8 Jul 2010 13:02:28 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-ELNK-Trace: 289b4676444fa27bf7f185e0b4d0be75e5331016acda17f91bf385703c67200c7bd01716f2087b31350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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. Thanks, -- Don W. -- 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