User forums > Using Code::Blocks

Problem with debugging... (GNU debugger)

(1/1)

knox:
Hi,


I'm using Code::Blocks 8.02.
I'm using Digital Mars Win32 compiler (Version: 8.5).
And I'm trying to use GDB

I set the following directory for debugger:
IDE->Settings->Compiler and debugger settings->
ToolChain Executables->
Debugger = gdb.exe
And in additional paths, I set the path to GDB.exe as k:\gdb\bin

I make a "Win32 GUI" project and build it.
It builds properly and executes too.

If I try to debug, I get an error. Here's the log:::

Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.7.50.20071127
No symbol table is loaded.  Use the "file" command.


How can I solve the above problem?


knox:
If I try to use Microsoft debugger (cdb.exe), nothing happens. And I get the following log::

Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger finished with status 1


Anything obvious here?

MortenMacFly:

--- Quote from: knox on March 27, 2008, 10:07:17 am ---Anything obvious here?

--- End quote ---
Probably you are missing to compile with the appropriate debug switch? Are you sure your executable contains debugging symbols (-g compiler options for GCC)?

knox:
I'm using Digital Mars compiler. And I'm setting the -g flag.
Is there any tutorial on this?

Is it because of the Digital Mars compiler version.
Cause CodeBlocks says
"Don't know how to setup debugging flags for this compiler"
"Don't know how to setup optimization flags for this compiler"
and so on.

is there any good tutorial that I can refer to use MinGW to compile.
Cause when I use GNU GCC compiler, i get hell a lot of warnings and errors.

My problem is that, I can compile, run and test, but can't debug.
And that defeats the whole purpose of moving to a new IDE.

Any help in any form is welcome.



JGM:

--- Quote from: knox on March 28, 2008, 06:19:29 am ---is there any good tutorial that I can refer to use MinGW to compile.
Cause when I use GNU GCC compiler, i get hell a lot of warnings and errors.

--- End quote ---

you are really going to like this  :D

http://code.google.com/p/htmlhelp/downloads/list?q=label:CHM

Navigation

[0] Message Index

Go to full version