Recent

Author Topic: Debugging  (Read 3571 times)

rtusrghsdfhsfdhsdfhsfdhs

  • Full Member
  • ***
  • Posts: 162
Debugging
« on: October 13, 2015, 11:31:27 pm »
When trying to debug a 64 bit app in 32 bit Lazarus IDE i get the following error...

"/project1.exe": not in executable format: File format not recognized
« Last Edit: October 14, 2015, 12:03:19 am by Fiji »

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Debugging
« Reply #1 on: October 14, 2015, 01:01:48 am »
You can't do that. You will need 64-bit OS and 64-bit GDB debugger to debug 64-bit programs. Probably you need 64-bit Lazarus, too.

rtusrghsdfhsfdhsdfhsfdhs

  • Full Member
  • ***
  • Posts: 162
Re: Debugging
« Reply #2 on: October 14, 2015, 01:40:49 am »
Delphi 32 bit can compile and debug 32 & 64... how to do the same with Lazarus?

Laksen

  • Hero Member
  • *****
  • Posts: 743
    • J-Software
Re: Debugging
« Reply #3 on: October 14, 2015, 01:46:32 am »
Try to use  a 64bit gdb exe

rtusrghsdfhsfdhsdfhsfdhs

  • Full Member
  • ***
  • Posts: 162
Re: Debugging
« Reply #4 on: October 14, 2015, 01:48:39 am »
I use fpcup. Do I need additional parameter?  :)

fpcup.exe --fpcURL="trunk" --lazURL="trunk" --installdir="A:\development\"

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Debugging
« Reply #5 on: October 14, 2015, 08:31:56 pm »
It should work on a 64 bit PC, with a 32 bit lazarus installed. There is a 32bit to 64bit cross compile add on, and it includes the 64 bit gdb.

Otherwise set up the path to gdb with whatever macros you need:
$(LazarusDir)\mingw\$(TargetCPU)-$(TargetOS)\bin\gdb.exe

You will need 2 gdb, on. 32 bit , and one 64 bit.

rtusrghsdfhsfdhsdfhsfdhs

  • Full Member
  • ***
  • Posts: 162
Re: Debugging
« Reply #6 on: October 14, 2015, 09:37:24 pm »
Okay it works, however...

I try to add several macros in the Additions and Overrides but Lazarus won't even recognize it.

GDB_PATH:=D:\TDM-GCC-64\gdb32\bin\gdb.exe

But it recognizes this

$(LazarusDir)\mingw\$(TargetCPU)-$(TargetOS)\bin\gdb.exe
« Last Edit: October 14, 2015, 10:33:50 pm by Fiji »

 

TinyPortal © 2005-2018