[fpc-devel] probably incorrect debug-line-info generated by fpc 2.6.2 and trunk

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Nov 10 22:27:55 CET 2013


On 10 Nov 2013, at 22:24, Martin wrote:

> Below is
> - a small function
> - an extract of what fpc generates with -la
> - from the -la output, the debug info
> 
> This was generated without optimization
> 
> the statement for "i:=1" ends after " movl    $1,%eax ".
> it ends before the value is written to memory (the "movl %eax,-12(%ebp)" is part of the next command)
> 
> This means the debugger can not show the correct value.

If you disable optimisations it will work as you expect. Even -O1 can slightly mess up the debug information in some cases.


Jonas


More information about the fpc-devel mailing list