On 14/02/2014 01:36, Xiangrong Fang wrote:
Hi Martin,

2014-02-14 1:14 GMT+08:00 Martin Frb <laza...@mfriebe.de <mailto:laza...@mfriebe.de>>:

    With -O2 and above the debugger does not always work.

    In case of such optimization the debug info compiled into the exe
    by fpc is not always accurate.

    It is not just blue dots, inspecting variables may show random
    data, ....

    Debugging with O2 and up, if you must, requires to only look at
    the disassembler and register window. registers can only be
    trusted in the ttop stackframe. selecting any other may not show
    correct info.


I never use optimization option other than O1, I think O1 is the default. As Sven suggested, I tried turning off optimization, and back on, still at O1 level.


Sorry, then I misunderstood you.

So where the blue dots missing, while you where at -O-? Or where they missing at -O1, and after you went to -O-, compiled (run), and went back to -O-1 they came back?

In either case, they should be there with -O- and -O1 , so if that is all you changed, then maybe it needed a clean build, and by changing settings, you triggered this clean build.

---
Strange though, because without blue dots, normally breakpoints to not work, but yours did (on the wrong line, but it did break).

The only other thing I can think of is, if you have symlinks to your files, and did open them in the IDE via different links/original. And/or fpc used a different symlink than the IDE.

In that cases it can happen that the IDE believes you have 2 independent files, while really you got just one. However breakpoints will work, because the error gets corrected when the IDE gives the wrong path to gdb, and retries with filename (no path) only. then gdb will set the breakpoint.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to