Recent

Author Topic: gdb for windows 64 bit  (Read 36895 times)

Eugene Loza

  • Hero Member
  • *****
  • Posts: 663
    • My games in Pascal
gdb for windows 64 bit
« on: March 23, 2011, 09:18:42 am »
I've just installed a 64bit lazarus version (0.9.30).
The project compiles successfully, but I cannot debug the project:
Quote
The debugger "C:\lazarus\mingw\bin\gdb.exe" does not exist or is not executable.
See Environment -> Debugger Options
I tried to install gdb.exe for win64 (I have windows XP 64 bit) but it fails to load resulting in "Debugger error". (tried this one http://svn2.freepascal.org/svn/lazarus/binaries/x86_64-win64/gdb/bin/ and http://www.equation.com/servlet/equation.cmd?fa=gdb ).

Is there any working debugger for WinXp64bit?
Can I use debugger other than gdb?
« Last Edit: March 23, 2011, 09:21:43 am by Eugene Loza »
My FOSS games in FreePascal&CastleGameEngine: https://decoherence.itch.io/ (Sources: https://gitlab.com/EugeneLoza)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: gdb for windows 64 bit
« Reply #1 on: March 23, 2011, 06:58:58 pm »
Quote
Is there any working debugger for WinXp64bit?
Try the one from MinGW64 project
Quote
Can I use debugger other than gdb?
Currently AFAIK no.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: gdb for windows 64 bit
« Reply #2 on: March 23, 2011, 09:10:21 pm »
http://svn2.freepascal.org/svn/lazarus/binaries/x86_64-win64/gdb/bin/

There is more than one version of gdb there (since it is svn)

Have you tried the current, and the last? (7.2.50 / 7.0.50 or 7.01)

Also, open the "debug output" window, from menu "view"/"debug windows", before you run the app, and copy the output, it may contain some hint what error occurred.

Or even check for console output. on linux, just start lazarus from a terminal, on windows you must recompile with -WC

oh, and make sure your antivirus or firewall isn't taking a dislike in gdb...


JD

  • Hero Member
  • *****
  • Posts: 1848
Re: gdb for windows 64 bit
« Reply #3 on: March 24, 2011, 12:05:14 pm »
oh, and make sure your antivirus or firewall isn't taking a dislike in gdb...

I have my debugger turned off because Comodo Firewall dosen't seem to "like" it. I just haven't found a way to get them to co-exist peacefully together.  >:(
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: gdb for windows 64 bit
« Reply #4 on: April 05, 2011, 12:21:47 pm »
I recently got 64 bit Windows 7 at work, installed Lazarus 0.9.30 stable and I can't get debugger to work.

With instalation of stable Lazarus 0.9.30, the gdb.exe comes to lazarus_dir\mingw\bin\ but it doesn't work!

I'm probably doing something wrong. I don't beleive that the stable Lazarus comes with GDB that just doesn't work with it.

Quote
Is there any working debugger for WinXp64bit?
Try the one from MinGW64 project

No success there either. :(
« Last Edit: April 05, 2011, 12:24:12 pm by Zoran »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: gdb for windows 64 bit
« Reply #5 on: April 05, 2011, 01:05:48 pm »
Actually, there is a problem (afaik) with the current setup:
http://bugs.freepascal.org/view.php?id=19044

AFFAIK All 3 parts of the equations (Lazarus, gdb, and fpc) had a lot of issues with 64 bits (at least on windows)

It looks like the above problem is an fpc problem.

I do not have 64 bit, so I can not test it.
but for all I read (mailing list, and other bugs), there is a combination of the 3 that actually can debug on win 64.

As for Lazarus, you definitely need 0.9.30, all previous versions did not do 64 bit debugging (well 0.9.29 did as of December 2010 or something like that).

As for GDB, I believe 7.2.5 (the one that comes with lazarus) is the best choice, but you can check the lazarus-binaries svn, there is a previous version too.

As for FPC, some fixes or trunk version is or was bale to do it. (write the correct debug info)
As in the bug I linked it looks like the released vrsion of fpc, does not do that (but that is my interpretation only)

You can try trunk, but it may be you need an svn version from a few weeks (or maybe 2 or 3 month) back.

As I said, I can't test it, so i can't tell which version works.

See the bug report, for how to get the actual error, and check if it is the same...

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: gdb for windows 64 bit
« Reply #6 on: April 05, 2011, 09:16:50 pm »
Thank you, Martin, for the information. The problem is the one from that bug report.

Maybe I could try to install 32-bit version of Lazarus for developing and use the 64-bit version only to finally compile 64-bit exe.

Eugene Loza

  • Hero Member
  • *****
  • Posts: 663
    • My games in Pascal
Re: gdb for windows 64 bit
« Reply #7 on: April 06, 2011, 03:37:18 am »
Maybe I could try to install 32-bit version of Lazarus for developing and use the 64-bit version only to finally compile 64-bit exe.
Wow! Great idea! I should also try this variant!
My FOSS games in FreePascal&CastleGameEngine: https://decoherence.itch.io/ (Sources: https://gitlab.com/EugeneLoza)

bobo

  • Full Member
  • ***
  • Posts: 171
Re: gdb for windows 64 bit
« Reply #8 on: April 06, 2011, 04:51:38 am »
You really do not need a 64bit Lazarus to make both 32 and 64 bit programs, you only need the 32bit Lazarus.

Here is what I do. I use the latest SVN version for both FPC and Lazarus.
This is how I compile FPC so I have both 32 and 64 bit ppu-s:

Code: [Select]
cd c:\pp
del /F /S /Q doc
del /F /S /Q examples
del /F /S /Q msg
del /F /S /Q units
cd c:\fpc_svn

@32bit FPC
make all
make install
make clean

@64bit FPC
make all OS_TARGET=win64 CPU_TARGET=x86_64
make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64
make clean OS_TARGET=win64 CPU_TARGET=x86_64

@Lazarus
del /F /S /Q c:\lazarus
cd c:\lazarus_svn
make all
make install
make clean

After all this, I just use the normal 32bit Lazarus I compiled to make my program.
Then, when I need to compile both 32 and 64 bit versions, I do 2 compiles:

Code: [Select]
fpc -Twin32 -Pi386 -otest32.exe test.pas

to make the test32.exe 32bit version, and

Code: [Select]
fpc -Twin64 -Px86_64 -otest64.exe test.pas

to make the test64.exe 64bit version.

 

TinyPortal © 2005-2018