problem with exception handling

Heinrich Roder hro@barney.lanl.gov
Fri Oct 17 14:36:00 GMT 1997


Why do I get a dumped core in this program. I use
the newest snapshot installed, ( test.C is attached)

gdb gives the following
Breakpoint 1 at 0x4002aba4
-- main starts --
-- f1 starts -- 
L TraceLifetime constructed for a.
-- f2 starts -- 
LL TraceLifetime constructed for c.
LD TraceLifetime destroyed for c.

Breakpoint 1, 0x4002aba4 in abort ()
(gdb) where
#0  0x4002aba4 in abort ()
#1  0x8050029 in copy_reg (reg=16, udata=0xbffff894, target_udata=0xbffff824)
#2  0x80502b1 in __throw ()
#3  0x804a304 in f1 () at /home/hro/C++/test.C:58
#4  0x804a3e9 in main () at /home/hro/C++/test.C:66
#5  0x804a02b in _start ()
--------------------------



1067> g++ -v -o ff ~/C++/test.C          
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.13/specs
gcc version egcs-2.90.13 971016 (gcc2-970802 experimental)
 /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.13/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Di386 -Di586 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__ -D__i586__ -Asystem(unix) -Acpu(i386) -Amachine(i386) /home/hro/C++/test.C /tmp/cca21366.ii
GNU CPP version egcs-2.90.13 971016 (gcc2-970802 experimental) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++
 /usr/local/include
 /usr/local/i586-pc-linux-gnulibc1/include
 /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.13/include
 /usr/include
End of search list.
/usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.13/cc1plus /tmp/cca21366.ii -quiet -dumpbase test.cc -version -o /tmp/cca21366.s
GNU C++ version egcs-2.90.13 971016 (gcc2-970802 experimental) (i586-pc-linux-gnulibc1) compiled by GNU C version 2.7.2.3.f.1.
/usr/local/include/g++/iostream.h: In method `int ostream::opfx()':
In file included from /home/hro/C++/test.C:18:
/usr/local/include/g++/iostream.h:53: warning: implicit declaration of function `int _IO_flockfile(...)'
/usr/local/include/g++/iostream.h: In method `void ostream::osfx()':
/usr/local/include/g++/iostream.h:54: warning: implicit declaration of function `int _IO_funlockfile(...)'
 as -V -Qy -o /tmp/cca213661.o /tmp/cca21366.s
GNU assembler version 2.7 (i586-unknown-linux), using BFD version 2.7.0.2
 /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.13/ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.1 -o ff /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.13/crtbegin.o -L/usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.13 -L/usr/local/i586-pc-linux-gnulibc1/lib -L/usr/local/lib /tmp/cca213661.o -lstdc++ -lm -lgcc -lc -lgcc /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.13/crtend.o /usr/lib/crtn.o
|11:51:08 :hro at barney> , ~/oldhome/scratch/egcs-971016/gcc :
 1068> ff
-- main starts --
-- f1 starts -- 
L TraceLifetime constructed for a.
-- f2 starts -- 
LL TraceLifetime constructed for c.
LD TraceLifetime destroyed for c.
LD TraceLifetime destroyed for c.
IOT trap/Abort (core dumped)

thanks for any help.
    HEinrich


-- 
test.C

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.C
Type: text/x-c++
Size: 2145 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/19971017/9dfa5381/attachment.bin>


More information about the Gcc mailing list