Recent

Author Topic: Debug 32 bit in 64 bit IDE?  (Read 3395 times)

fasdfasdfasdfasdfasdf

  • New Member
  • *
  • Posts: 45
Debug 32 bit in 64 bit IDE?
« on: January 02, 2019, 08:25:28 pm »
Delphi IDE can build, debug both 32 & 64 targets, while Lazarus can only do either or.

How to workaround this??

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Debug 32 bit in 64 bit IDE?
« Reply #1 on: January 02, 2019, 08:34:15 pm »
The Lazarus IDE can build different targets.
For windows, there are add ons on our SourceForge site, that install all relevant tools.

You can then compile for win32 or win64.

And the debugger will change correctly according to the target.
The add ons install the required 32/64 bit versions of GDB, and the default settings of the IDE (if you have not changed them) have $(TargetCPU) in the path to gdb, so the correct gdb is chosen.

fasdfasdfasdfasdfasdf

  • New Member
  • *
  • Posts: 45
Re: Debug 32 bit in 64 bit IDE?
« Reply #2 on: January 02, 2019, 09:00:52 pm »
Ah. Where can we get this addon?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Debug 32 bit in 64 bit IDE?
« Reply #3 on: January 02, 2019, 09:10:06 pm »
As on the left side off this forum (Downloads Laz+Fpc) http://sourceforge.net/project/showfiles.php?group_id=89339

The addons only come for Windows, to allow 32/64 bit windows cross compiling (you need to choose the correct addon, based on if your IDE is 64 or 32 bit). The add on is in the same folder as the IDE installer.
Be aware that before version 2.0RC3 the add on does not ask for the path. It uses the path of the primary Lazarus install (in case you have 2ndary installs)

The add on contains the cross compiler, and a gdb version for the correct bitness.

As for the config.
If you do not want to reset your entire config, the default value for the dbg path is
Code: [Select]
$(LazarusDir)\mingw\$(TargetCPU)-$(TargetOS)\bin\gdb.exe
So if you already have cross compilers, and gdb versions then you just have to put them in the correct folders in your install dir
E.g:
C:\lazarus\mingw\i386-win32\bin\
C:\lazarus\mingw\x86_64-win64\bin\

You can change the path to suit your install layout. So long as target cpu and/or os appear in either the path or filename.

fasdfasdfasdfasdfasdf

  • New Member
  • *
  • Posts: 45
Re: Debug 32 bit in 64 bit IDE?
« Reply #4 on: January 02, 2019, 10:38:22 pm »
Works great! Is it possible to change the modes through some sort of window?
Or do we have to go always to Project Options\ Build modes?

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: Debug 32 bit in 64 bit IDE?
« Reply #5 on: January 02, 2019, 10:46:05 pm »
Works great! Is it possible to change the modes through some sort of window?
Or do we have to go always to Project Options\ Build modes?
use the build drop down menu from the IDE toolbar. see attached image.

fasdfasdfasdfasdfasdf

  • New Member
  • *
  • Posts: 45
Re: Debug 32 bit in 64 bit IDE?
« Reply #6 on: January 02, 2019, 10:47:43 pm »
Ah. Duoh!! :D :D

 

TinyPortal © 2005-2018