This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs 10-31 and UnixWare


Given the similarity in the symptoms and the environments, I 
suspect that the Unixware and OpenServer problems are related.

I don't know why he's getting nailed with it on every executable
and I'm only getting hammered in one test case, though.

>   > Here's the backtrace:
>   > #0  0xbffb3783 in kill ()
>   > #1  0xbffe3528 in abort ()
>   > #2  0x804853e in __do_global_dtors_aux ()
>   > #3  0x8048ffd in _fini ()
> Can you do something like
> 
> x/50i __do_global_dtors_aux
> 
> 
> Basically I don't see how the __do_global_dtors_aux routine from gcc's
> crtstuff.c can call abort -- unless abort is on the dtor list.  So I'm
> wondering if you're getting the correct crtbegin.o file.

Abort isn't on the dtor list in my case, but I"m starting to 
really distrust GDB here.   According to a print __DTOR_LIST__[1],
I don't have a dtor list, clearly there are destructors running.

> Or maybe gdb is lying and you called abort from __deregister_frame which
> would indicate that the exception handlers never got registered in the
> first place or were clobbered.

What if exit() is recursing?  

$ gdb a.out
GDB is free software and you are welcome to 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.
GDB 4.14-95q4 (i486-unknown-sco3.2v5.0.0elf),
Copyright 1995 Free Software Foundation, Inc...
Breakpoint 1 at 0x80484b8
(gdb) break exit
Breakpoint 2 at 0x8048498
(gdb) break __do_global_dtors_aux
Breakpoint 3 at 0x80485a6
(gdb) break __deregister_frame
Breakpoint 4 at 0x8048e24
(gdb) run
Starting program: /home/play/ss/a.out
Breakpoint 1 at 0x8003ded9
Breakpoint 2 at 0x800196c4
++count
++count
Base
--count

Breakpoint 2, 0x800196c4 in exit ()
(gdb) cont
Continuing.

Breakpoint 3, 0x80485a6 in __do_global_dtors_aux ()
(gdb) cont
Continuing.
--count
--count

Breakpoint 2, 0x800196c4 in exit ()
(gdb) cont
Continuing.

Breakpoint 1, 0x8003ded9 in abort ()
(gdb)

This can't be good.

Hmmm.   Sure enough.  If I change the "exit 0" in the p9732b
program I'd just sent to "_exit 0", it works even with the 
HAVE_ATEXIT.    


> Can you compile frame.c with debug symbols, add it to libgcc, then put
> a breakpoint in __deregister_frame to see what's going on?

My breakpoint on __deregister_frame never gets called.

RJL


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]