Recent

Author Topic: Break point isn't actual the position program breaked  (Read 868 times)

@Func

  • New Member
  • *
  • Posts: 36
Break point isn't actual the position program breaked
« on: January 06, 2020, 04:50:28 am »
Dear all

When i using F8 OR f7 TO step in source code . the cursor postion alway one line ahead to actual cup processing source code.

also if there have some error , the actual error line is also not the complier report line.

for example the complier report error line is 5. so the actual problem line is 4.

Does there any suggestion . Thanks a lot for you helping.

I found before the code paste below , every thing is ok. and BTW the source work fine in delphi . Just not good in lazarus.

 
          if (JvInterpreterMethod.ResTyp = varSmallint) or
            (JvInterpreterMethod.ResTyp = varInteger) or
            (JvInterpreterMethod.ResTyp = varBoolean) or
            (JvInterpreterMethod.ResTyp = varEmpty) or
            (JvInterpreterMethod.ResTyp = varObject) or
            (JvInterpreterMethod.ResTyp = varPointer) then
            asm
              mov      EAX, REAX
              mov      EDX, REDX
              mov      ECX, RECX
              call     Func
              mov      iRes, EAX
            end     
« Last Edit: January 06, 2020, 07:34:11 am by tcustomzd »

MarkMLl

  • Hero Member
  • *****
  • Posts: 8515
Re: Break point isn't actual the position program breaked
« Reply #1 on: January 06, 2020, 09:05:56 am »
Usual things: what operating system, what version of Lazarus and FPC, have you disabled optimisation and so on.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

@Func

  • New Member
  • *
  • Posts: 36
Re: Break point isn't actual the position program breaked
« Reply #2 on: January 06, 2020, 09:54:09 am »
I have coment asm code. It works now.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11926
  • Debugger - SynEdit - and more
    • wiki
Re: Break point isn't actual the position program breaked
« Reply #3 on: January 06, 2020, 11:01:20 am »
for example the complier report error line is 5. so the actual problem line is 4.

So somewhere your code trips fpc.
Since fpc miscounts lines, it passes this on to the debugger. The issue needs to be fixed in fpc.

If you are on fpc 3.0.4 or above, you should report this on the bugtracker.
Ideally with an example, that can be compiled standalone.

If you are on an older fpc, you should upgrade and test.
Or post a compilable example here.

 

TinyPortal © 2005-2018