Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Amazon Corretto\jdk18.0.1_10\bin;C:\Python310\Scripts;C:\Python310;C:\Program Files\Python310\Scripts;C:\Program Files\Python310;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\msys64\mingw64\bin;C:\MinGW\MinGW\bin;C;C:\Users\GodMode\AppData\Local\Microsoft\WindowsApps;C:\Users\GodMode\AppData\Local\Programs\Microsoft VS Code\bin
Starting debugger: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet -args C:/Users/JohnD/DOCUME~1/EXERCI~1/RVISIO~2/Ex_6/Ex_6/bin/Debug/Ex_6.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 8.1
Child process PID: 1528
[Inferior 1 (process 1528) exited normally]
Debugger finished with status 0
This forum software absolutely does not like some non ascii charachters, so if the log has non ascii characters the best would be to put it in a txt file and attach it here
[debug]"C:/Programmations/Ex_6/bin/Debug/Ex_6.exe": not in executable format: File format not recognized
[debug](gdb)
I also installed "Msys64"ow... this could now lead to problems like you are seeing...
[debug][Thread 4760.0x2dbc exited with code 0]This indicates that your program exits before it reaches the breakpint...
[debug][Inferior 1 (process 4760) exited normally]
From your last logQuote[debug][Thread 4760.0x2dbc exited with code 0]This indicates that your program exits before it reaches the breakpint...
[debug][Inferior 1 (process 4760) exited normally]
Try to add the breakpoint at the first line in the main function and then single step trough (not by using the red arrow, but the single step button)
GDB 8.1 has issues like the one reported. As such please update to a later version (at least use V9 or preferably 11 or 12). The latest GDB is V12.1, but not all compiler toolchains have this version yet.
If you cannot get a later version for the compiler toolchain you are using then try the latest from the following github repo:
- https://github.com/ssbssa/gdb/releases
Of cours you can do bisectional search with break points to find the point where your application exits.
Also make sure you have deactivated all code optimization so not that you put a break point in a line that gets optimized away from the compiler and debugger can not break on it
GDB 8.1 has issues like the one reported. As such please update to a later version (at least use V9 or preferably 11 or 12). The latest GDB is V12.1, but not all compiler toolchains have this version yet.
If you cannot get a later version for the compiler toolchain you are using then try the latest from the following github repo:
- https://github.com/ssbssa/gdb/releases