User forums > Using Code::Blocks

How do I use the mingw64 gdb debugger?

<< < (2/2)

BlueHazzard:
this is the build log, not the debugger log

you have to start the debugger and then copy the text from the debugger tab  from the bottom of the window

lucky7456969:

--- Code: ---[debug]Command-line: C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname  -quiet  -args E:/Jacky/DOCUME~1/CODEBL~1/PERFEC~1/bin/Debug/PERFEC~1.EXE
[debug]Working dir : E:\Jacky\DOCUME~1\CODEBL~1\PERFEC~1

Starting debugger: C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname  -quiet  -args E:/Jacky/DOCUME~1/CODEBL~1/PERFEC~1/bin/Debug/PERFEC~1.EXE
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]"E:/Jacky/DOCUME~1/CODEBL~1/PERFEC~1/bin/Debug/PERFEC~1.EXE": not in executable format: File format not recognized
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.6.1
[debug]Copyright (C) 2013 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]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.6.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 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]No symbol table is loaded.  Use the "file" command.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Program Files (x86)\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory D:/mingw64/bin
[debug]Source directories searched: D:/mingw64/bin;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory E:/Jacky/DOCUME~1/CODEBL~1/PERFEC~1/
[debug]Source directories searched: E:/Jacky/DOCUME~1/CODEBL~1/PERFEC~1;D:/mingw64/bin;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "E:/Jacky/Documents/Code Blocks Projects/PerfectSim/main.cpp:7"
[debug]No symbol table is loaded.  Use the "file" command.
[debug]Breakpoint 2 ("E:/Jacky/Documents/Code Blocks Projects/PerfectSim/main.cpp:7") pending.
[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

--- End code ---

lucky7456969:
I discovered the cause, due to wrong debugger setting, should be using X:\mingw64\bin\gdb.exe
However, I wonder can I designate different debuggers to different compilers?
Thanks
Jack

oBFusCATed:
Yes, you can.

Steps:
1. Make two or more configs
2. In the toolchain settings of the compiler choose the proper config for every compiler
3. Select Debug-> Active debugger -> Target's default

Navigation

[0] Message Index

[*] Previous page

Go to full version