Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: purplex88 on June 02, 2019, 01:23:12 pm

Title: MinGW64 Debugger not starting
Post by: purplex88 on June 02, 2019, 01:23:12 pm
I downloaded and Installed Code::Blocks "codeblocks-17.12mingw-setup.exe" and it works great.

Today, I added 'MinGW64' i.e. x64 version of compiler which comes with 8.1 version of GDB. However, regardless of my settings the debugger is not launching properly. Instead, the old debugger 7.9.1 that with came with Code::Blocks starts up.

My settings are shown in attached files.

The debugger log looks like this:

Quote
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: D:\Projects\C++ Test\
Adding source dir: D:\Projects\C++ Test\
Adding file: D:\Projects\C++ Test\bin\Debug\C++ Test.exe
Changing directory to: "D:/Projects/C++ Test/."
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\CodeBlocks\MinGW;C:\Program Files (x86)\CodeBlocks\MinGW-W64\mingw64\bin;C:\Program Files (x86)\CodeBlocks\MinGW-W64\mingw64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft MPI\Bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Windows\System32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Users\HPPC\AppData\Roaming\wxWidgets-3.1.0\lib\vc_dll;C:\Users\HPPC\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\Java\jdk1.8.0_102\bin;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files\PuTTY;C:\Program Files (x86)\Calibre2;C:\Users\HPPC\AppData\Local\Programs\Python\Python36\Scripts;C:\Users\HPPC\AppData\Local\Programs\Python\Python36;C:\Program Files (x86)\Nmap;C:\Users\HPPC\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64;C:\Users\HPPC\AppData\Local\Programs\EmEditor;C:\Users\HPPC\AppData\Local\Programs\Microsoft VS Code\bin
Starting debugger: C:\Program Files (x86)\CodeBlocks\MinGW\gdb32\bin\gdb32.exe -nx -fullname -quiet  -args "D:/Projects/C++ Test/bin/Debug/C++ Test.exe"
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.9.1
Child process PID: 26736
At D:\Projects\C++ Test\test.cpp:5
Debugger finished with status 0
Title: Re: MinGW64 Debugger not starting
Post by: purplex88 on June 02, 2019, 03:18:41 pm
Okay, it wasn't working because my project was using a different compiler.

But now I am getting a totally different error:

Quote
Active debugger config: GDB/CDB debugger:gdb64
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: D:\Projects\CodeBlocks\C++ New\
Adding source dir: D:\Projects\CodeBlocks\C++ New\
Adding file: D:\Projects\CodeBlocks\C++ New\bin\Debug\C++ New.exe
Changing directory to: "D:/Projects/CodeBlocks/C++ New/."
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\MinGW-W64\mingw64\bin;C:\Program Files (x86)\CodeBlocks\MinGW-W64\mingw64;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\CodeBlocks\MinGW;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft MPI\Bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Windows\System32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Users\HPPC\AppData\Roaming\wxWidgets-3.1.0\lib\vc_dll;C:\Users\HPPC\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\Java\jdk1.8.0_102\bin;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files\PuTTY;C:\Program Files (x86)\Calibre2;C:\Users\HPPC\AppData\Local\Programs\Python\Python36\Scripts;C:\Users\HPPC\AppData\Local\Programs\Python\Python36;C:\Program Files (x86)\Nmap;C:\Users\HPPC\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64;C:\Users\HPPC\AppData\Local\Programs\EmEditor;C:\Users\HPPC\AppData\Local\Programs\Microsoft VS Code\bin
Starting debugger: C:\Program Files (x86)\CodeBlocks\MinGW-W64\mingw64\bin\gdb.exe -nx -fullname -quiet  -args "D:/Projects/CodeBlocks/C++ New/bin/Debug/C++ New.exe"
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 8.1
Starting the debuggee failed: No executable specified, use `target exec'.
Debugger finished with status 0
Title: Re: MinGW64 Debugger not starting
Post by: oBFusCATed on June 02, 2019, 03:39:09 pm
Try to place your project in a path without spaces?
Title: Re: MinGW64 Debugger not starting
Post by: purplex88 on June 02, 2019, 03:41:24 pm
Try to place your project in a path without spaces?

Yes, that did the trick. But why now? I had no problems with spaces when I used MingGW setup that came with Code::Blocks.
Title: Re: MinGW64 Debugger not starting
Post by: oBFusCATed on June 02, 2019, 03:56:16 pm
No, idea. Probably something changed in the gdb and now it doesn't like the path CB is passing it.

Can you specify the version of compiler, gdb and codeblocks you're using?

I have plans to investigate these whitespace issues someday, because they are annoying... ;(
Title: Re: MinGW64 Debugger not starting
Post by: purplex88 on June 02, 2019, 04:05:22 pm
Yes, thank you please tell me if you find out:
Compiler: GNU GCC Compiler 8.1 (x64)
Operating System: Windows 8.1 (x64)
Code::Blocks: 17.12 (x86)
GDB: 8.1 (x64)
Title: Re: MinGW64 Debugger not starting
Post by: oBFusCATed on June 02, 2019, 06:51:22 pm
Which release are you using? mingw or mingw-w64?
Title: Re: MinGW64 Debugger not starting
Post by: purplex88 on June 02, 2019, 06:59:09 pm
Both of them. The 'space' error happens with mingw-w64 but when I use mingw that came code blocks it doesn't happen i.e. it is fine to use spaces in project names and the debugger works.
Title: Re: MinGW64 Debugger not starting
Post by: oBFusCATed on June 02, 2019, 07:42:00 pm
Oh, and keep in mind that a 32bit program cannot interrupt 64bit program. So the pause and stop buttons in the debugger toolbar won't work. Also it won't be possible to add breakpoints if the program is running and it is not stopped on another breakpoint.
Title: Re: MinGW64 Debugger not starting
Post by: raynebc on June 02, 2019, 08:10:38 pm
MinGW traditionally has trouble with spaces in its path as well.  The very first sentence of this article on their website says so:
http://www.mingw.org/wiki/Getting_Started