Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,094
    • Issues 2,094
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #39584
Closed
Open
Created Jan 21, 2022 by Andrey Zubarev@zamtmn

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

Edited Jan 21, 2022 by Andrey Zubarev
Assignee
Assign to
Time tracking