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_______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
