From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7847 invoked by alias); 24 Nov 2004 08:49:54 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 7569 invoked from network); 24 Nov 2004 08:49:28 -0000 Received: from unknown (HELO mail.aaronwl.com) (68.228.0.128) by sourceware.org with SMTP; 24 Nov 2004 08:49:28 -0000 Received: from [70.182.14.214] (cdm-70-182-14-214.laft.cox-internet.com [70.182.14.214]) by mail.aaronwl.com (8.12.11/8.12.11) with ESMTP id iAO8nOcs000436; Wed, 24 Nov 2004 08:49:24 GMT Message-ID: <41A44B97.1060007@aaronwl.com> Date: Wed, 24 Nov 2004 09:41:00 -0000 From: "Aaron W. LaFramboise" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 MIME-Version: 1.0 To: Richard Henderson CC: Danny Smith , gcc@gcc.gnu.org, Cygwin , mingw-dvlpr Subject: Re: stdcall lib functions with exception throwing callbacks vs Dwarf2 EH References: <001701c4d1ab$949322e0$0a6d65da@DANNY> <20041124003240.GA6028@redhat.com> <000c01c4d1fa$3f297fd0$e56d65da@DANNY> <20041124080708.GA3578@redhat.com> In-Reply-To: <20041124080708.GA3578@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00887.txt.bz2 Richard Henderson wrote: > On Wed, Nov 24, 2004 at 08:50:17PM +1300, Danny Smith wrote: > >>So is it a general requirements of DW2 EH that functions that are passed >>callbacks as args be compiled with -fexceptions, if the callbacks may >>throw? > > Yes. Thus glibc compiles e.g. qsort and bsearch with -fexceptions. Is there a way to have the DW2 unwinder call some particular function, for eg, if the previous frame was not compiled with -fexceptions, rather than just crashing? Is this what MD_FALLBACK_FRAME_STATE_FOR is for? Other Windows compilers are able to handle this condition. I don't know anything at all about MSVC's non-SEH exception handling, and I have not done any analysis at all, but it seems likely that these compilers are unwinding SEH information in foreign frames. If this is the case, compatibility with this is highly desirable, and perhaps essential for throwing through system routines that use SEH, which is something other compilers on the system support. Aaron W. LaFramboise