Author Topic: Use CB as standalone debugger frontend?  (Read 4783 times)

ulit

  • Guest
Use CB as standalone debugger frontend?
« on: July 11, 2006, 02:28:41 pm »
Hi there,
I am searching for a replacement of the good old ddd which could simply load an executable compiled with "gcc -g" and served as graphical frontend for gdb.
From the archives, I found that one can use the current HEAD version of CB and attach to an already running process.
Works fine, although you have to set breakpoints manually. Also, there seems to be no popup window when pointing to a variable in the source code, although the currently executed line is displayed.

Is there or will be the option to directly debug an executable not compiled with CB?

Thanks!
Uli

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Use CB as standalone debugger frontend?
« Reply #1 on: July 11, 2006, 03:09:15 pm »
Is there or will be the option to directly debug an executable not compiled with CB?

It 'd be better if you explained a little better what exactly it is that you 're missing.
I 'm sure that if something's missing from the debugger plugin, it could be implemented (within reason!).
Be patient!
This bug will be fixed soon...

ulit

  • Guest
Re: Use CB as standalone debugger frontend?
« Reply #2 on: July 12, 2006, 01:42:27 pm »
My idea was to just start CB, open an executable file (which includes debug information) and CB shows up the source files involved in the executable (from the debug symbols), I can set breakpoints and start debugging. That's basically the functionality ddd provides under linux.

I found that about the same functionality can be achieved by using the "Attach to process" command, but that needs to get the pid of the process first. But, as I reported, no pop-up windows for variable contents were available and I had to set up breakpoints by using direct gdb commands ("break ns::function()"). Also I would miss the startup code of an application by attaching to it.

I was just too lazy to setup a real CB project, because my project (Qt on Windows, with self-created master Makefile), here has around 30 files. I think I'll try it; in addition I have seen that I can use my own Makefile with CB :-)

Regards,
Uli
« Last Edit: July 12, 2006, 01:44:02 pm by ulit »

Bekas

  • Guest
Re: Use CB as standalone debugger frontend?
« Reply #3 on: December 03, 2006, 05:29:16 pm »
Hi all,

I've just started using Code::Blocks, so forgive me if the answer is too obvious.

I have compiled a project in mingw with its custom make file (not using CB), and I would like to debug the executable using CB. To be more specific I just want to set a breakpoint in the source file and define the executable and command line parameters for debugging in CB; is this possible and, if yes, how ?
« Last Edit: December 04, 2006, 01:23:08 am by Bekas »

Bekas

  • Guest
Re: Use CB as standalone debugger frontend?
« Reply #4 on: December 06, 2006, 12:17:10 pm »
I've found a workaround. I created a 'dummy project' as a static library and at Project -> Set program's arguments I set the 'Host application' to the executable that I want to debug.

A small annoyance, that probably can be easily fixed, is that in order to set breakpoints the source file must be included in the project. GDB wants Unix paths (c:/path/to/file) and if the source file is not included to the project, Code::Blocks passes it as 'c:\path\to\file'.