[fpc-devel]Okay, another one

Peter Vreman peter at freepascal.org
Sat Apr 12 14:56:01 CEST 2003


>Okay what we do now? 2372 lines of code in ncal.pas... How long it will take
>for me to understand it :) Without ability to debug in it delphi I will have

I wouldn't even recommend to start understanding the compiler in ncal.pas 
as it is one of the more complex parts of the compiler.

>to use gdb and this will take even longer. Can anyone explain how to fix
>this, I mean not just fix but explain how just as an example. Btw I believe
>I reported this bug before.

The easiest way to debug the compiler is to use the IDE from 1.0.x. That 
way you can debug like you could do with bp7.

Then when debugging place a breakpoint at the offencing internalerror() 
call and run the program, when it hits the breakpoint you can investigate 
the variables and analyze what is wrong. When that is not enough the place 
a breakpoint earlier in the program flow and make the breakpoint 
conditional with the condition 'aktfilepos.line=<line where compilation 
aborts>'. Then you can step through the compiler to see what actually happends.


Peter




More information about the fpc-devel mailing list