0

I am trying to debug my C code on CodeBlocks with GDB Debugger. Unfortunately It does not work, I've tried almost everything including uninstall and re install CodeBlocks (debugger included). Here's down below I'll put the exit error so you can get way better where the problem is:

Active debugger config: GDB/CDB debugger:Default 
Building to ensure sources are up-to-date
Selecting target:  
Release 
Adding source dir: D:\20201105_es8_randomWalk\ 
Adding source dir: D:\20201105_es8_randomWalk\ 
Adding file: D:\20201105_es8_randomWalk\bin\Release\20201105_es8_randomWalk.exe
Changing directory to: D:/20201105_es8_randomWalk/. 
Set variable: PATH=.;D:\programms\CodeBlocks\MinGW\bin;D:\programms\CodeBlocks\MinGW;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Users\pnmat\AppData\Local\Microsoft\WindowsApps
Starting debugger: D:\programms\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet  -args D:/20201105_es8_randomWalk/bin/Release/20201105_es8_randomWalk.exe
done
Setting breakpoints 
Reading symbols from D:/20201105_es8_randomWalk/bin/Release/20201105_es8_randomWalk.exe...(no debugging symbols found)...done. 
Debugger name and version: GNU gdb (GDB) 8.1 
No symbol table is loaded.  Use the "file" command.
Temporary breakpoint 3 ("D:/20201105_es8_randomWalk/main.c:23") pending. 
Child process PID: 8516 [Inferior 1 (process 8516) exited normally] 
Debugger finished with status 0

It seems like it does not hit any breakpoint I've inserted in the code.

10
  • 3
    No symbol table is loaded. -> Compile with -g flag on, and gcc is not a debugger, you mean gdb Commented Nov 6, 2020 at 9:34
  • Yes, I am sorry I meant 'gdb'. Could you please tell me what do you mean with -g flag on? Thank you very much Commented Nov 6, 2020 at 9:41
  • Hi @matthw, the -g flag generates debug information to be used by the debugger, this will solve your issue: wiki.codeblocks.org/index.php/… Commented Nov 6, 2020 at 9:47
  • Unfortunately the flag was already on. Still not working Commented Nov 6, 2020 at 9:52
  • That's odd, try cleaning and rebuilding the whole project, you can also try to run gdb manually outside Codeblocks launching gdb your_program from the console in your working directory. Commented Nov 6, 2020 at 10:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.