delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/01/30/06:48:14

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: pavenis AT lanet DOT lv
To: djgpp-workers AT delorie DOT com
Date: Wed, 30 Jan 2002 13:25:51 +0200
MIME-Version: 1.0
Subject: Re: gcc-3.0.X
Message-ID: <3C57F45F.13610.99AD6D@localhost>
In-reply-to: <20020129171029.Q565@libra.eth.ericsson.se>
References: <3C56E298 DOT 5356 DOT 19D34E8 AT localhost>; from pavenis AT lanet DOT lv on Tue, Jan 29, 2002 at 05:57:44PM +0200
X-mailer: Pegasus Mail for Windows (v4.01)
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

--Message-Boundary-22682
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

On 29 Jan 2002 at 17:10, Laszlo Molnar wrote:

> On Tue, Jan 29, 2002 at 05:57:44PM +0200, pavenis AT lanet DOT lv wrote:
> > 	C++ exceptions breakage with -gdwarf-2. Maybe somebody could
> 
> Do you remember that some years ago we solved a similar problem with
> gcc's new exception handling (when it switched to the dwarf2 unwinder)?
> Maybe something similar happened again. IIRC, at that time the problem
> was that the eh_* sections were handled as text sections instead of
> data (and they used 0x90 bytes as alignment instead of 0x00).
> 
> Just a guess, Laszlo

I'm including simple test example together with Makefile in attachments.
Result is difference between contents of .eh_frame sections.

Verified that reverting changes in .eh_frame section between assembler files
generated with and without -ggdb fixes breakage

Andris


--Message-Boundary-22682
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  exc.cc
     Date:  29 Jan 2002, 12:33
     Size:  713 bytes.
     Type:  Text

--Message-Boundary-22682
Content-type: Application/Octet-stream; name="exc.cc"; type=Text
Content-disposition: attachment; filename="exc.cc"

#include <cstdio>

void  PrList (int stopval)
{       int x = 1;
        while (1)
        {       
           if (x >= stopval)
           {
              printf ("Throwing \"Out of bounds\"\n");
              throw "Out of bounds";
           }
           printf ("%d\n",x++);
        }
}

int  main (void)
{
        try
        {
           PrList (10);
        }
        catch (char *msg)
        {
           printf ("char* catched: %s\n",msg);
        }
        catch (const char *msg)
        {
           printf ("const char* catched: %s\n",msg);
        }
        catch (...)
        {
           printf ("Unknown exception catched\n");
        }
        return 0;
}

--Message-Boundary-22682
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  Makefile
     Date:  30 Jan 2002, 13:17
     Size:  841 bytes.
     Type:  Text

--Message-Boundary-22682
Content-type: Application/Octet-stream; name="Makefile"; type=Text
Content-disposition: attachment; filename="Makefile"


all:	clean exc_dwarf.exe exc_stabs.exe eh_stabs_dwarf.diff

clean:
	rm -f *.sd *.s *.o *.exe

eh_stabs_dwarf.diff:	exc_dwarf.s exc_stabs.s
	diff -u3 exc_stabs.eh exc_dwarf.eh >eh_stabs_dwarf.diff

exc_dwarf.s:	exc.cc
	gpp -O2 -dA -S -gdwarf-2 exc.cc -o exc_dwarf.sd
	gpp -O2 -S -gdwarf-2 exc.cc -o exc_dwarf.s
	cat exc_dwarf.sd | sed -n -e '/[.]eh_fram/,/\.section/p' >exc_dwarf.eh

exc_dwarf.o:	exc_dwarf.s
	as -o exc_dwarf.o exc_dwarf.s

exc_dwarf.exe:	exc_dwarf.o
	gpp -o exc_dwarf.exe exc_dwarf.o

exc_stabs.s:	exc.cc
	gpp -O2 -dA -S -gstabs+ exc.cc -o exc_stabs.sd
	gpp -O2 -S -gstabs+ exc.cc -o exc_stabs.s
	cat exc_stabs.sd | sed -n -e '/[.]eh_fram/,/\.section/p' >exc_stabs.eh

exc_stabs.o:	exc_stabs.s
	as -o exc_stabs.o exc_stabs.s

exc_stabs.exe:	exc_stabs.o
	gpp -o exc_stabs.exe exc_stabs.o




--Message-Boundary-22682--

- Raw text -


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