[fpc-devel] Why debugger does not "step in"?

Martin Frb lazarus at mfriebe.de
Sat Mar 24 09:42:59 CET 2018


On 24/03/18 02:24, Gennady Agranov wrote:
> Hi,
>
> I use FPC 3.0.4 / Lazarus 1.8.2
>
> I am seeing the same behavior when I debug the program using Lazarus 
> IDE under Win64 and Linux64
>
> When I want to "step in" into my own function/procedure - GDB simply 
> steps over...
>
> If I set a breakpoint inside the function/procedure I want to "step 
> in" and "run" - it would stop at this breakpoint. 

It isn't a method of an "interface"? interfaces indeed have this issue.

But if it is a normal procedure, then this is odd.  A few things you can 
try:

- On Windows, use an external linker (option -Xe)
- Try stabs vs Dwarf (Project Options > Debugging)
- Do NOT use smart linking
- Do NOT use any optimization -O...
- Try a diff version of gdb
- Try an older fpc (but keep all else the same). So you know if it is an 
issue with current fpc.

I also found a bug report https://bugs.freepascal.org/view.php?id=31599 
that may or may not be related.

Someone recently reported they had the opposite problem, where the 
debugger would step in, when they actually stepped over. Not sure if 
related.



More information about the fpc-devel mailing list