Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: knox on March 27, 2008, 09:15:58 am

Title: Problem with debugging... (GNU debugger)
Post by: knox on March 27, 2008, 09:15:58 am
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?


Title: Re: Problem with debugging... (GNU debugger)
Post by: knox on March 27, 2008, 10:07:17 am
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?
Title: Re: Problem with debugging... (GNU debugger)
Post by: MortenMacFly on March 27, 2008, 04:42:22 pm
Anything obvious here?
Probably you are missing to compile with the appropriate debug switch? Are you sure your executable contains debugging symbols (-g compiler options for GCC)?
Title: Re: Problem with debugging... (GNU debugger)
Post by: knox on March 28, 2008, 06:19:29 am
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.



Title: Re: Problem with debugging... (GNU debugger)
Post by: JGM on March 28, 2008, 03:03:04 pm
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.

you are really going to like this  :D

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