This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Still an Exception(al) Failure
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Still an Exception(al) Failure
- From: Chip Salzenberg <chip at valinux dot com>
- Date: Wed, 15 Dec 1999 14:13:52 -0800
- References: <19991208141726.A21577@perlsupport.com>
I wrote earlier:
> When linked with libstdc++-v3, a tiny test program can't catch any
> exceptions....
Well, it's *still* happening.
Could someone who understands how exceptions work tell me what to look
for? I'm currently quite ignorant of egcs exception handling.
>
> ----------------------------------------------------------------
> #include <iostream>
> #include <string>
>
> using namespace std;
> main()
> {
> try { throw string("x"); }
> catch (const string &s) { cout << s << endl; }
> }
> ----------------------------------------------------------------
>
> My g++ is the current CVS snapshot:
>
> $ /u/egcs/bin/g++ -v
> Reading specs from /u/egcs/bin/../lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
> gcc version 2.96 19991207 (experimental)
>
> ... with -fsquangle and -fhonor-std on by default.
>
> Here's a backtrace.
>
> Help?!
>
> ----------------------------------------------------------------------------
> $ gdb ./a.out
> GNU gdb 19990928
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu"...
> (gdb) run
> Starting program: /u/src/perl/topaz/current/./a.out
>
> Program received signal SIGABRT, Aborted.
> 0x2525d1 in kill () from /lib/libc.so.6
> (gdb) where
> #0 0x2525d1 in kill () from /lib/libc.so.6
> #1 0x2522b8 in raise () from /lib/libc.so.6
> #2 0x253911 in abort () from /lib/libc.so.6
> #3 0x1890f5 in get_reg_addr () from /u/egcs/lib/libstdc++.so.3
> #4 0x1891ab in next_stack_level (pc=0x80499c2, udata=0xbffff9a4,
> caller_udata=0xbffff92c) from /u/egcs/lib/libstdc++.so.3
> #5 0x1893b6 in throw_helper (eh=0x2108fc, pc=0x80499c2, my_udata=0xbffffa64,
> offset_p=0xbffffa60) from /u/egcs/lib/libstdc++.so.3
> #6 0x189618 in __throw () from /u/egcs/lib/libstdc++.so.3
> #7 0x80499c3 in main () at tt.cc:7
> (gdb)
> ----------------------------------------------------------------------------
>
> --
> Chip Salzenberg - a.k.a. - <chip@valinux.com>
> "Fleagal. Bingo. Drooper. Snork. They're cops." //MST3K
>
--
Chip Salzenberg - a.k.a. - <chip@valinux.com>
"Fleagal. Bingo. Drooper. Snork. They're cops." //MST3K