Hello, I yesterday I updated my old version of codeblocks (version 16.01) to codeblocks 17.12 and for some reason my debugger will fails to start.
Every time I attempt to debug one of my projects I would get this error message.
Starting the debuggee failed: No executable specified, use `target exec'.
[debug]> quit
Debugger finished with status 0
I checked my compiler and debugger paths and they are both going to MinGW folder that installed with codeblocks.
Toolchain executable path- E:\Program Files (x86)\CodeBlocks\MinGW
Debugger executable path- E:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb32.exe
I'm not sure what I did in between me updating to the newer version to cause this, but if anyone could help me it would be much appreciated.
Here is my full debug log.
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner\
Adding source dir: E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner\
Adding file: E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner\bin\Debug\DataCleaner.exe
Changing directory to: E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/.
Set variable: PATH=.;E:\Program Files (x86)\CodeBlocks\MinGW\bin;E:\Program Files (x86)\CodeBlocks\MinGW;E:\C mingw32\bin;E:\C mingw32;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\dotnet;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\MySQL\MySQL Utilities 1.6;E:\Program Files\Git\cmd;E:\Program Files\nodejs;C:\Users\mackimus\AppData\Local\Programs\Python\Python36-32\Scripts;C:\Users\mackimus\AppData\Local\Programs\Python\Python36-32;C:\Users\mackimus\AppData\Local\Microsoft\WindowsApps;E:\Program Files\Java\jdk1.8.0_121\bin;E:\Program Files\Java\jre1.8.0_121\bin;E:\Program Files\Microsoft VS Code\bin;E:\Program Files\LLVM\bin;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\mackimus\AppData\Roaming\npm;E:\Program Files\mingw-w64\x86_64-7.1.0-posix-seh-rt_v5-rev2\mingw64\bin
[debug]Command-line: E:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb32.exe -nx -fullname -quiet -args E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/bin/Debug/DataCleaner.exe
[debug]Working dir : E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner
Starting debugger: E:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb32.exe -nx -fullname -quiet -args E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/bin/Debug/DataCleaner.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Setting breakpoints
[debug]"E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/bin/Debug/DataCleaner.exe": not in executable format: File format not recognized
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.9.1
[debug]Copyright (C) 2015 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.9.1
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/
[debug]Source directories searched: E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]No executable specified, use `target exec'.
[debug]Starting program:
[debug]>>>>>>cb_gdb:
Starting the debuggee failed: No executable specified, use `target exec'.
[debug]> quit
Debugger finished with status 0
[debug]"E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/bin/Debug/DataCleaner.exe": not in executable format: File format not recognized
Check if ur program actually got compiled and works, if it does, probably a mismatch of compiler and gdb. I can see 3 different MinGW on your path, one beeing 64 Bit and that gdb seems to be 32 Bit.
Okay, I moved that folder that had that 64-bit compiler on it to a different location on my drive, and that error message went away. Unfortunately, a new debugger error message appeared concerning threads.
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner\
Adding source dir: E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner\
Adding file: E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner\bin\Debug\DataCleaner.exe
Changing directory to: E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/.
Set variable: PATH=.;E:\Program Files (x86)\CodeBlocks\MinGW\bin;E:\Program Files (x86)\CodeBlocks\MinGW;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\dotnet;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\MySQL\MySQL Utilities 1.6;E:\Program Files\Git\cmd;E:\Program Files\nodejs;C:\Users\mackimus\AppData\Local\Programs\Python\Python36-32\Scripts;C:\Users\mackimus\AppData\Local\Programs\Python\Python36-32;C:\Users\mackimus\AppData\Local\Microsoft\WindowsApps;E:\Program Files\Java\jdk1.8.0_121\bin;E:\Program Files\Java\jre1.8.0_121\bin;E:\Program Files\Microsoft VS Code\bin;E:\Program Files\LLVM\bin;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\mackimus\AppData\Roaming\npm
[debug]Command-line: E:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb32.exe -nx -fullname -quiet -args E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/bin/Debug/DataCleaner.exe
[debug]Working dir : E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner
Starting debugger: E:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb32.exe -nx -fullname -quiet -args E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/bin/Debug/DataCleaner.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Setting breakpoints
[debug]Reading symbols from E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/bin/Debug/DataCleaner.exe...
[debug]done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.9.1
[debug]Copyright (C) 2015 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.9.1
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner/
[debug]Source directories searched: E:/myStuff/Programming/C++/Practice/codeBlocks/DataCleaner;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner\bin\Debug\DataCleaner.exe
Child process PID: 18144
[debug][New Thread 18144.0xf34]
[debug][Inferior 1 (process 18144) exited with code 01]
[debug]>>>>>>cb_gdb:
[Inferior 1 (process 18144) exited with code 01]
[debug]> quit
Debugger finished with status 0
The path variable comes from windows, you cannot easily modify that from CodeBlocks, you can maybe overwrite it to be empty, but its better to clean your path variable in windows.
But i don't think this has an effect on CodeBlocks, better check your settings again, are you really compiling your program with the toolchain you think you are? Check the build log to be sure.
I rebuilt my program and the log said I am using mingw32.
Here are some lines from the build log.
mingw32-g++.exe -Wall -fexceptions -Weffc++ -g -Weffc++ -g -Iinclude -c E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -Wall -fexceptions -Weffc++ -g -Weffc++ -g -Iinclude -c E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner\src\jsonParser.cpp -o obj\Debug\src\jsonParser.o
mingw32-g++.exe -o bin\Debug\DataCleaner.exe obj\Debug\main.o obj\Debug\src\jsonParser.o
In file included from E:\myStuff\Programming\C++\Practice\codeBlocks\DataCleaner\main.cpp:3:0: