delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/08/20/12:51:26

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
Posted-Date: Fri, 20 Aug 1999 18:40:07 +0200 (CEST)
Date: Fri, 20 Aug 1999 18:40:07 +0200 (CEST)
From: Paul Henshaw <paul DOT henshaw AT jrc DOT it>
X-Sender: pslh AT elpc15 DOT jrc DOT it
Reply-To: Paul Henshaw <paul DOT henshaw AT jrc DOT it>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: catching Exceptions thrown from within a DLL (egcs,NT,C++,b20.1)
Message-Id: <Pine.LNX.4.04.9908201829191.24453-100000@elpc15.jrc.it>
Mime-Version: 1.0

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.

	The same program linked statically behaves as expected.

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

	The programs and libraries are built with egcs-1.1.2 on
	Windows NT workstation with cygwin-b20.1.  

	Rather than use the __declspec(dllexport/import) syntax all
	over, I have hidden all my global/class static data behind
	access functions - this seems cleaner as it does not 
	introduce "magic words" in the source, and is probably a 
	more sensible and flexible approach anyways.  On the other
	hand it might have something to do with the problems I have
	now...
	
	Once again, any help or advice is very much appreciated.
	
		Cheers,
				Paul

Paul Henshaw, Institute for Systems, Informatics and Safety 
TP270,  JRC Ispra,  21020 Ispra (VA),  Italy
Tel:    ++39 0332 785262        Fax: ++39 0332 789185
WWW:    http://gist.jrc.it:8080/paul.gx


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