X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f From: pavenis AT lanet DOT lv To: DJ Delorie , eli Zaretskii Date: Fri, 1 Feb 2002 13:03:09 +0200 MIME-Version: 1.0 Subject: Re: gcc-3.X: -gdwarf-2 breaks C++ exceptions for DJGPP Cc: djgpp-workers AT delorie DOT com Message-ID: <3C5A920D.3055.AA388E@localhost> In-reply-to: <200201311821.g0VILGF15061@greed.delorie.com> References: <3C59942D DOT 3293 DOT 177886E AT localhost> (pavenis AT lanet DOT lv) X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 31 Jan 2002 at 13:21, DJ Delorie wrote: > > The place I usually have to fix first is simply getting the dwarf2 > structures registered at program startup time, something > gcc/crtstuff.c is supposed to handle. Seems that I have found a source of that breakage. About a half a year ago we had a discussion in djgpp-workers about changing register naming sheme for debug info. See: http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp- workers/2001/07/28/14:30:56 http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp- workers/2001/07/28/20:10:59 http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp- workers/2001/07/28/21:58:04 http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp- workers/2001/08/03/12:20:06 http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp- workers/2001/08/03/12:20:23 http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp- workers/2001/08/03/13:33:18 The suggested definition of DBX_REGISTER_NUMBER breaks C++ exceptions when -gdwarf-2 is being used. There seems to be possible workaround for this problem without reverting this change by adding definition of DWARF_FRAME_REGNUM which is by default defined to DBX_REGISTER_NUMBER: #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) \ ((write_symbols == DWARF2_DEBUG) ? svr4_dbx_register_map[n] : dbx_register_map[n]) #undef DWARF_FRAME_REGNUM #define DWARF_FRAME_REGNUM(n) dbx_register_map[n] I don't know whether it's correct though. At least it seems to work. Andris