gdb for windows 64 bit lazarus / 12-Debugger ---------------------------------------------------------------------- Eugene Loza · 2011-03-23 08:18 I've just installed a 64bit lazarus version (0.9.30). The project compiles successfully, but I cannot debug the project: QuoteThe debugger "C:\lazarus\mingw\bin\gdb.exe" does not exist or is not executable. See Environment -> Debugger OptionsI 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? ---------------------------------------------------------------------- Leledumbo · 2011-03-23 17:58 QuoteIs there any working debugger for WinXp64bit?Try the one from MinGW64 project QuoteCan I use debugger other than gdb?Currently AFAIK no. ---------------------------------------------------------------------- Martin_fr · 2011-03-23 20:10 Quote from: Eugene Loza on March 23, 2011, 09:18:42 am 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 · 2011-03-24 11:05 Quote from: Martin_fr on March 23, 2011, 09:10:21 pmoh, 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. ---------------------------------------------------------------------- Zoran · 2011-04-05 10:21 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 from: Leledumbo on March 23, 2011, 06:58:58 pmQuoteIs there any working debugger for WinXp64bit?Try the one from MinGW64 project No success there either. ---------------------------------------------------------------------- Martin_fr · 2011-04-05 11:05 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 · 2011-04-05 19:16 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 · 2011-04-06 01:37 Quote from: Zoran on April 05, 2011, 09:16:50 pmMaybe 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! ---------------------------------------------------------------------- bobo · 2011-04-06 02:51 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.