delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/08/20/14:04:27

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199908201801.NAA25343@mercury.xraylith.wisc.edu>
To: Paul Henshaw <paul DOT henshaw AT jrc DOT it>
cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: catching Exceptions thrown from within a DLL (egcs,NT,C++,b20.1)
In-Reply-To: Your message of "Fri, 20 Aug 1999 18:40:07 +0200."
<Pine DOT LNX DOT 4 DOT 04 DOT 9908201829191 DOT 24453-100000 AT elpc15 DOT jrc DOT it>
Date: Fri, 20 Aug 1999 13:01:17 -0500
From: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>

Paul Henshaw <paul DOT henshaw AT jrc DOT it> writes:
> Dear All,
> 
> 	having managed now to build and link against a DLL, I have
> 	encountered a problem with exception handling.
> 
> 	I have a test program which deliberately provokes an exception,
> 	expecting to catch it, and throw it to it's caller.
> 
> 	When I run the DLLed version of this program, the exception
> 	is constructed and displayed correctly, but the caller does
> 	not catch the exception, and my SIGABORT handler is called.

This is a problem that's been there since the beginning, and will be
there for a while to come, sorry. Nobody is actively working on this
part, at least publicly.

The long term solution is rewrite the C++ exception mechanism for
windows32 ports using SEH.

> 	So is there is some magic incantation to chant over DLLs
> 	to make exceptions work, or am I just being stupid (again)?

I'll be grateful if someone does find a workaround for this issue.

btw, the problem shows up on other platforms as well -- such as HPUX
-- where exceptions thrown by shared libraries can't be caught. Not
always an easy problem to solve, especially on window32, which GCC
hackers just don't have much of an incentive to work on.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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