gcc-4.1.1 and exception handling (libstdc++)

Peter S. Mazinger ps.m at gmx.net
Fri Aug 11 09:38:51 UTC 2006


On Thu, 10 Aug 2006, Ed Swierk wrote:

> On 8/10/06, Peter S. Mazinger <ps.m at gmx.net> wrote:
> > I did some tests with gcc-4.1.1/uClibc-svn and the only working
> > configuration to run throw2.cpp test file is to use
> > unwind-dw2-fde-glibc.c (and not unwind-dw2-fde.c as it does now in
> > buildroot), the --enable-sjlj-exceptions does not help either.
> >
> > --enable-sjlj-exceptions is needed though for all gcc<4 (despite the
> > changes in buildroot saying that only gcc-3.3 needed this)
> >
> > Tests were done on x86
> 
> I can run throw2.cpp (with an ERROR on catching float) using gcc-4.1.1

the float error is there since I can recall ;-( (maybe caused by the float 
wrappers?)

> and uClibc-20060720 on x86 and powerpc. I built gcc with
> --enable-sjlj-exceptions and --enable-__cxa_atexit; the latter fixes
> segv on exit in C++ shared libraries, but probably has nothing to do
> with exceptions.

ar t libgcc_eh.a? which unwind-dw2-fde*.o is there?

Peter
> 
> 1  Throwing out_of_range()
>     Catching: out_of_range out_of_range meaningful comment
> 2  Throwing exception()   // Can't specify comment
>     Catching: St9exception
> 3  Throwing underflow_error  // caught by base class (runtime_error)
>     Catching: runtime_error underflow_error
> 4  Throwing runtime_error
>     Catching: runtime_error a comment
> 5  Throwing length_error   // caught be super-super-class (exception)
>     Catching: St9exception
> 6  Throwing int
>     Catching: int 26
> 7  Throwing const char*
>     Catching: const char* This is a const char*
> 8  Throwing string
>     Catching: string I'm a string
> 9  Throwing float
>     ERROR: Nobody caught this!
> 10  Throwing up
> 
> --Ed
> 
> 

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list