Invalid current executed line inside generic during debugging
- Lazarus/FPC Version: Lazarus 2.3.0 (rev main-2_3-647-g1e405b00) FPC 3.3.1 x86_64-win64-win32/win64
- Debugger backend: GDB
- Operating System: Win11
- CPU / Bitness: 64
What happens
In some cases, the debugger shows an incorrect current executed line. There is a shift of 1-2 lines. Pressing F8 actually executes one line, but the other is highlighted in the editor
What did you expect
Everything should be soft and fluffy
Steps to reproduce
Open the attached project bug.zip Please don't rate the code, it's terrible))
To reproduce the problem, such things are important:
- missing parscompare.exe file and lib folder (erase them if they were left over from prev attempt)
- only parscompare.lpr file opened in editor (close other if they were left over from prev attempt)
Set breakpoint parscompare:20, press F9, parscompare:20 is trigged, press F7, you move to uzeparser:1348, press F8 , you move to uzeparser:1350 - it wrtong!!!
If you continue debugging line 1349 will actually be executed, this can be seen by the content of the variable i
Finish debugging and simply start over. This time everything will be right. To repeat the problem, follow the important conditions described above