Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: Eric Youngblut MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14508.32095.512846.629105@grover.student.washington.edu> Date: Thu, 17 Feb 2000 14:59:43 -0800 (PST) To: Mumit Khan Cc: Paul Henshaw , cygwin AT sourceware DOT cygnus DOT com Subject: Re: catching Exceptions thrown from within a DLL (egcs,NT,C++,b20.1) X-Mailer: VM 6.75 under Emacs 20.5.1 I was able to hack up a solution that allowed me to catch a C++ exception thrown from inside a DLL. I put my technique up on the web: http://www.cs.washington.edu/homes/yngblut/ehtest/ I hope other people find this useful. Eric Youngblut yngblut AT cs DOT washington DOT edu PS Thanks to all of the Cygwin and Mingw32 developers! I appreciate your work tremendously. Mumit Khan wrote: > >Paul Henshaw 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