Recent

Author Topic: Compiled 64bits program gives error; how to debug?  (Read 3548 times)

flaza

  • Jr. Member
  • **
  • Posts: 57
Compiled 64bits program gives error; how to debug?
« on: March 10, 2018, 04:17:53 pm »
Hi,
Ik use Lazarus 1.6.4 (win10) 32bits. I've debugged my program and the compiled 32bits version works fine.
I also compile a 64bits version and running that program a particular part gives an 'Access violation' error.
My problem is that I can't debug in 64bits modus, there is only een 32bits version of gdb present.
What can I do to solve this debugging problem?
Frans

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Compiled 64bits program gives error; how to debug?
« Reply #1 on: March 10, 2018, 05:02:47 pm »
How did you install your Lazarus?

Did you use the 32bit installer from our homepage or sourceforge (both the same).

Then how did you compile to 64 bit, where did you get the 64bit compiler?

There is a cross compile add-on on sourceforge, and if you install this it includes a 64 bit gdb.

If you upgraded an older installation check the path to gdb:
$(LazarusDir)\mingw\$(TargetCPU)-$(TargetOS)\bin\gdb.exe

If it does not contain the variables, then it will not find the 64bit gdb, but you can change it to point to it.

----------
You can also go to our sourceforge "windows 64" folder, and look for "alternative gdb". There you can download a 64 bit gdb.

flaza

  • Jr. Member
  • **
  • Posts: 57
Re: Compiled 64bits program gives error; how to debug?
« Reply #2 on: March 11, 2018, 09:57:13 am »
Hi.
I used the 32bits installer and the extra cross installer, but I have no 64bits gdb.
But now I do, I've downloaded the alternative gdb.
Thx for the help.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Compiled 64bits program gives error; how to debug?
« Reply #3 on: March 11, 2018, 01:18:35 pm »
I installed lazarus-1.8.2-fpc-3.0.4-cross-x86_64-win64-win32 and I got C:\lazarus\mingw\x86_64-win64\bin\gdb.exe

 

TinyPortal © 2005-2018