[fpc-devel] gdb crashes with trunk

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Apr 5 13:32:40 CEST 2008


On 05 Apr 2008, at 10:48, Martin Schreiber wrote:
> main.pas:1422
> 1422      mainstatfile.readstat;
> (gdb) bt
> #0  TMAINFO__MAINONLOADED (SENDER=0xb761f870, this=0xb761f870) at
> main.pas:1422
> #1  0x08188b37 in TCUSTOMMSEFORM__DOEVENTLOOPSTART (this=0xb761f870)  
> at
> mseforms.pas:848
> #2  0x08188b83 in TCUSTOMMSEFORM__RECEIVEEVENT (EVENT=0xb7bfabe0,
> this=0xb761f870) at mseforms.pas:857
> Segmentation fault
> "
> :-(
> Because of the missing TMAINFO_ it was probably dwarf and not stabs  
> which
> worked before.

This is caused by the fact that some restructuring of the debug info  
writer broke this fix:

------------------------------------------------------------------------
r8565 | jonas | 2007-09-19 18:37:49 +0200 (Wed, 19 Sep 2007) | 5 lines
Changed paths:
    M /trunk/compiler/dbgstabs.pas
    M /trunk/compiler/symconst.pas
    A /trunk/tests/webtbs/tw9766.pp

   * avoid writing the stabs for a child class before those of a parent
     class in case the parent class has a field with as type the  
(forward
     defined) child class, because this crashes gdb
   + (interactive) test for this

------------------------------------------------------------------------

I'll try to fix it again.

It's unfortunate that automating testing the debug info is hard to do  
in a cross-platform way. Does the unix "expect" utility exist for  
Windows? If so, maybe we can add tests similar to those in the gdb  
testsuite -- and otherwise we can still add them for unix only, since  
several unix testsuite runs are performed daily and the debug info is  
mostly OS-independent.


Jonas



More information about the fpc-devel mailing list