From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12786 invoked by alias); 2 Feb 2007 12:18:36 -0000 Received: (qmail 12778 invoked by uid 22791); 2 Feb 2007 12:18:35 -0000 X-Spam-Check-By: sourceware.org Received: from bay0-omc1-s29.bay0.hotmail.com (HELO bay0-omc1-s29.bay0.hotmail.com) (65.54.246.101) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 02 Feb 2007 12:18:29 +0000 Received: from hotmail.com ([65.55.136.89]) by bay0-omc1-s29.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Fri, 2 Feb 2007 04:17:08 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 2 Feb 2007 04:17:08 -0800 Message-ID: Received: from 65.55.136.123 by by131fd.bay131.hotmail.msn.com with HTTP; Fri, 02 Feb 2007 12:17:07 GMT X-Sender: gwwang10@hotmail.com In-Reply-To: From: =?gb2312?B?zfUguNXOsA==?= To: eljay@adobe.com, gcc-help@gcc.gnu.org Bcc: Subject: Re: __builtin_setjmp/__builtin_longjmp Implementation Date: Fri, 02 Feb 2007 12:18:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-02/txt/msg00038.txt.bz2 Hi Eljay, when I established my compiler ,I set my configure options as: ../gcc-4.1-20060407/configure --target=sh-elf --host=i686-pc-cygwin --build=i686-pc-cygwin --prefix=$PREFIX --with-newlib --with-gnu-as --with-gnu-ld --enable-threads --enable-languages=c,c++ --enable-version-specific-runtime-libs --enable-sjlj-exceptions My program is a c++ program ,and uses etry/throw/catch.I tried to compile my program with GCC,you know,with "--enable-sjlj-exceptions" configured, the compiler will process the exception with a setjmp/longjmp mechanism.but My program crashed. Should I try the other exception handling mechanism "dwarf2 mechanism" ? If I want to try,only need I change the "--enable-sjlj-exceptions" as "--with-dwarf2"? thank you ! Sincerely, --David >From: John Love-Jensen >To: Íõ ¸Õΰ , MSX to GCC >Subject: Re: __builtin_setjmp/__builtin_longjmp Implementation Implementation >Date: Fri, 02 Feb 2007 05:51:48 -0600 > >Hi David, > > > My program about exception handle crashs ,when "longjmp" is called to > > restore context,and registers are not restored correctly. > >Is your program a C program? A C++ program? > >If it is a C++ program, are you using C++ exceptions (try/throw/catch)? If >you are using C++ exceptions, you cannot interleave C++ exceptions and >setjmp/longjmp. > >Are you using the volatile qualifier on stack variables outside the context >of the setjmp, if they are used within the context of the body of the >setjmp? > >Without more information, it will be very difficult to diagnose the problem >you are experiencing. > >Sincerely, >--Eljay > _________________________________________________________________ ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn