Author Topic: Problem with debugging... (GNU debugger)  (Read 4346 times)

knox

  • Guest
Problem with debugging... (GNU debugger)
« 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?



knox

  • Guest
Re: Problem with debugging... (GNU debugger)
« Reply #1 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?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Problem with debugging... (GNU debugger)
« Reply #2 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)?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

knox

  • Guest
Re: Problem with debugging... (GNU debugger)
« Reply #3 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.




Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Problem with debugging... (GNU debugger)
« Reply #4 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