delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/01/31/12:00:03

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: pavenis AT lanet DOT lv
To: gcc-bugs AT gcc DOT gnu DOT org
Date: Thu, 31 Jan 2002 18:59:57 +0200
MIME-Version: 1.0
Subject: gcc-3.X: -gdwarf-2 breaks C++ exceptions for DJGPP (where to look?)
Cc: djgpp-workers AT delorie DOT com
Message-ID: <3C59942D.3293.177886E@localhost>
X-mailer: Pegasus Mail for Windows (v4.01)
Reply-To: djgpp-workers AT delorie DOT com

I have found that using DWARF-2 debugging information for
gcc-3.X (both gcc-3.0.3 and CVS head) breaks C++ exceptions
for target i586-pc-msdosdjgpp. 

C++ exceptions works for this target both with -gcoff and -gstabs.

Contents of .eh_frame section is identical if I use -gcoff and -gstabs
but slightly different when I specify -gdwarf-2. An attempt to manually
copy in contents of .eh_frame section in assembler file (from one built
using -gstabs) fixes the problem. 

So it seems that use of -gdwarf-2 causes the generation of wrong contents
of .eh_frame section. As far as I verified there is no similar problem
for i686-pc-linux-gnu

Andris

PS. here are diffs between assembler sources (.eh_frame section only).
	Other compiler options (-O2) were identical for all tests and code
	in .text section were identical both when I requested DWARF2
 	and stabs debugging info

--- exc_stabs.eh	Thu Jan 31 18:47:56 2002
+++ exc_dwarf.eh	Thu Jan 31 18:47:54 2002
@@ -13,7 +13,7 @@
 	.long	___gxx_personality_v0
 	.byte	0x0	/ LSDA Encoding (absolute)
 	.byte	0xc	/ DW_CFA_def_cfa
-	.uleb128 0x5
+	.uleb128 0x4
 	.uleb128 0x4
 	.byte	0x88	/ DW_CFA_offset, column 0x8
 	.uleb128 0x1
@@ -31,12 +31,12 @@
 	.long	LCFI0-LFB1
 	.byte	0xe	/ DW_CFA_def_cfa_offset
 	.uleb128 0x8
-	.byte	0x84	/ DW_CFA_offset, column 0x4
+	.byte	0x85	/ DW_CFA_offset, column 0x5
 	.uleb128 0x2
 	.byte	0x4	/ DW_CFA_advance_loc4
 	.long	LCFI1-LCFI0
 	.byte	0xd	/ DW_CFA_def_cfa_register
-	.uleb128 0x4
+	.uleb128 0x5
 	.byte	0x4	/ DW_CFA_advance_loc4
 	.long	LCFI3-LCFI1
 	.byte	0x83	/ DW_CFA_offset, column 0x3
@@ -61,12 +61,12 @@
 	.long	LCFI5-LFB2
 	.byte	0xe	/ DW_CFA_def_cfa_offset
 	.uleb128 0x8
-	.byte	0x84	/ DW_CFA_offset, column 0x4
+	.byte	0x85	/ DW_CFA_offset, column 0x5
 	.uleb128 0x2
 	.byte	0x4	/ DW_CFA_advance_loc4
 	.long	LCFI6-LCFI5
 	.byte	0xd	/ DW_CFA_def_cfa_register
-	.uleb128 0x4
+	.uleb128 0x5
 	.byte	0x4	/ DW_CFA_advance_loc4
 	.long	LCFI7-LCFI6
 	.byte	0x2e	/ DW_CFA_GNU_args_size
@@ -82,7 +82,4 @@
 	.p2align 2
 LEFDE3:
 /NO_APP
-	.text
-	.stabs "",100,0,0,Letext
-Letext:
-	.ident	"GCC: (GNU) 3.1 20020129 (experimental)"
+	.section .text



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019