Recent

Author Topic: Lazarus 1.8.5 sometimes Debugger F7,F8 not working  (Read 3113 times)

af0815

  • Full Member
  • ***
  • Posts: 172
Re: Lazarus 1.8.5 sometimes Debugger F7,F8 not working
« Reply #15 on: August 14, 2018, 07:23:52 am »
Back to my original problem with F7 and F8. I have cleared the whole projectgroup. Recompiled anything with automatic and now it is working (for me).

If the problem araise i will have a look on the debugging-windows and make a trace of it.
regards
Andreas

af0815

  • Full Member
  • ***
  • Posts: 172
Re: Lazarus 1.8.5 sometimes Debugger F7,F8 not working
« Reply #16 on: August 14, 2018, 09:50:30 am »
I have it again, the problem with F7 and F8.
Lazarus 1.8.5 r58495 FPC 3.1.1 i386-win32-win32/win64
F7 in Debuggerwindow
Quote
<-data-evaluate-expression $fp>
^done,value="0x195f8d8"
(gdb)
<-exec-step>
^error,msg="Warning:\nCannot insert breakpoint -233.\nCannot access memory at address 0x72d54ef4\n"
(gdb)
F8 in Debuggerwindow
Quote
<-break-enable 10>
^done
(gdb)
<-break-enable 9>
^done
(gdb)
<-data-evaluate-expression $fp>
^done,value="0x195f8d8"
(gdb)
<-exec-next>
^error,msg="Warning:\nCannot insert breakpoint -236.\nCannot access memory at address 0x72d54ef4\n"
(gdb)
Comandlineparameters (from Projectoptions - Show Options) without the -F !
Quote
-MObjFPC -Scaghi -CirotR -O1 -g -gl -gh -Xg -gt -WG -l -vewnhibq

The program is not using Threads.

Edit: It look actual for me, if i use not 'Use external gdb debug symbols file (-Xg)' it works. If i recompile with -Xg it doesnt work.

« Last Edit: August 14, 2018, 10:36:52 am by af0815 »
regards
Andreas

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4952
    • wiki
Re: Lazarus 1.8.5 sometimes Debugger F7,F8 not working
« Reply #17 on: August 14, 2018, 12:48:00 pm »
Quote
Code: Pascal  [Select]
  1. ^error,msg="Warning:\nCannot insert breakpoint -233.\nCannot access memory at address 0x72d54ef4\n"

The above means gdb has an internal problem. Something went wrong in GDB when GDB tried to find out where the step should end (where the next line is).

I dont know why it is related to Xg.
Though one danger of Xg is, that the file may for some reason not be updated on every compile (verify it has the same date as the exe).
Or there may be an old one around in addition to the new one (I do not know all the locations that gdb searches.).
If gdb had an outdate file, then that would cause problems.

Generally I recommend not to use Xg.
Set up build modes for debug and release. Then it is easy to recompile your release version without debug info.
Or use strip.exe to generate your release.

af0815

  • Full Member
  • ***
  • Posts: 172
Re: Lazarus 1.8.5 sometimes Debugger F7,F8 not working
« Reply #18 on: August 14, 2018, 01:49:23 pm »
The date/time is similar to the exe. If i set breakpoint by breakpoint i can step wit F9 :-) So the dbg file it looks not corrupt.

But i have no problem now, because i look for the Xg switch and set it off, if i want to debug.

BTW i use buildmodes very extensive. This was one of my problem to find the logic of the issue.
regards
Andreas

Pascal

  • Hero Member
  • *****
  • Posts: 783
Re: Lazarus 1.8.5 sometimes Debugger F7,F8 not working
« Reply #19 on: August 14, 2018, 03:41:30 pm »
Yes! Works great. I found a newer one here https://svn.freepascal.org/svn/fpcbuild/binaries/i386-win32
Many thanks, Martin!

Well, after using this the whole day, i must say that i have problems with F7 now  %)
Sometimes it works like F9 and sometime the IDE says the program is running while it isn't reacting anymore.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1803)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4952
    • wiki
Re: Lazarus 1.8.5 sometimes Debugger F7,F8 not working
« Reply #20 on: August 14, 2018, 03:46:12 pm »
Yes! Works great. I found a newer one here https://svn.freepascal.org/svn/fpcbuild/binaries/i386-win32
Many thanks, Martin!

Well, after using this the whole day, i must say that i have problems with F7 now  %)
Sometimes it works like F9 and sometime the IDE says the program is running while it isn't reacting anymore.

logfile?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4952
    • wiki
Re: Lazarus 1.8.5 sometimes Debugger F7,F8 not working
« Reply #21 on: August 21, 2018, 03:30:07 pm »
There is an issue with 64bit (possible only if fpc 3.0.4 is used, not sure) where step over, will step in.

This also is in latest trunk. Very aanoying  :(

Anyone with a good way to reproduce, can you add to https://bugs.freepascal.org/view.php?id=34159