Recent

Author Topic: Debug symbols line number bug  (Read 919 times)

440bx

  • Hero Member
  • *****
  • Posts: 4894
Debug symbols line number bug
« on: November 23, 2024, 05:31:53 am »
Hello,

Please refer to the attachment.

Execution is currently stopped at source line 901 (see left hand side), this is (correctly) reflected on the right hand side (line 901).

The problem is that there are two (2) additional "901" lines (they are above the current one) and only the currently highlighted one is the correct one. The other two are incorrect.

Comments welcome.

Note: FPC v3.2.2,  Lazarus v3.99
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10668
  • Debugger - SynEdit - and more
    • wiki
Re: Debug symbols line number bug
« Reply #1 on: November 23, 2024, 10:07:15 am »
I haven't looked into the concrete reasons for this case. But this happens a lot.

The compiler writes some of the "end" line code with the "begin" line number, and vice versa. Also "try" line code and some other stuff goes into end/begin....

You will also notice that when stepping.

440bx

  • Hero Member
  • *****
  • Posts: 4894
Re: Debug symbols line number bug
« Reply #2 on: November 23, 2024, 12:16:43 pm »
I haven't looked into the concrete reasons for this case. But this happens a lot.

The compiler writes some of the "end" line code with the "begin" line number, and vice versa. Also "try" line code and some other stuff goes into end/begin....

You will also notice that when stepping.
Yes, I've noticed it before too.

I figured that since FPC v3.2.4 is being "prepared", this might have been a good time to bring it up.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10668
  • Debugger - SynEdit - and more
    • wiki
Re: Debug symbols line number bug
« Reply #3 on: November 23, 2024, 01:36:36 pm »
Afaik it is still the same in 3.3.1
So then there is nothing that could get merged to 3.2.4

But maybe someone from fpc know more...

There probably is a bug report on it too. But I couldn't find it right now (didn't spent much time to search).

 

TinyPortal © 2005-2018