Author Topic: Microsoft command line debugger plugin  (Read 7802 times)

Offline romanianborg

  • Single posting newcomer
  • *
  • Posts: 3
Microsoft command line debugger plugin
« on: August 25, 2005, 11:16:17 pm »
HI,

The $soft Debugging Tools for Windows comes with a command line debugger 'cdb.exe' It is similar to gdb. I think it is very easy to modify the gdb debugger plugin and create a debugger plugin for microsoft debugger.

I'm new to this forum and I do not have much time to create this plugin.. but if somebody points me to the right place I can take a look to see how the gdb plugin is done and create a similar plugin for $soft debugger.

I think this plugin will drive many users to use this future IDE.

Cheers.

grv575

  • Guest
Re: Microsoft command line debugger plugin
« Reply #1 on: August 27, 2005, 03:49:20 pm »
It's not impossible but maybe more work than you would think.
C:\Devel\codeblocks\src\plugins\debuggergdb\debuggergdb.cpp has the internals.  It's 1600 lines and not really abstracted to support multiple debuggers.  What would be good is either
a) create a base class with the ui handling stuff and then derive from it for each specific debugger
b) create a more general class that handles the ui stuff but reads from xml config files.  so you could just put
<cmdstep>step< />
etc

But that's reworking a lot of code.  Would be good to eventually get working (assuming cdb supports all the primitives used: step, step into, disassemble, etc) since debugging msvc executables which use .pbd debug format isn't supported within the ide currently.

Btw, do the other compilers supported (openwatcom, digital mars, ...) use .pdb files for their debug info or maybe even CV (codeview) format within the exe (because I think cdb can handle these) or are they using some proprietary debug format + debuggers (which of course could also maybe be plugged in as above if that's the case)?

Offline romanianborg

  • Single posting newcomer
  • *
  • Posts: 3
Re: Microsoft command line debugger plugin
« Reply #2 on: August 28, 2005, 10:42:21 pm »
Seems to be a lot of work.
I think an easier way to do this is to make an exe console that translate the gdb commands into cdb commands .. and the output of cdb as well..

So there will be a new console that internaly will execute the cdb .. take commands (gdb commands) from codeblocks and send them to cdb.. the output from cdb is converted to gdb output and send back to codeblocks.
This is not so much work...I think... it depends on the number of gdb implemented commands..
If a debugger like this one is created how it will be integrated to codebocks?.. It will distributed with codeblocks? or just a simple how to section somewhere in the docs..

In future it will be easy to integrate another debugger..using the same method.

Cheers

grv575

  • Guest
Re: Microsoft command line debugger plugin
« Reply #3 on: August 28, 2005, 11:39:41 pm »
No, if you look at the code, cb sends commands to gdb but does a buch of background work to get paths in a usable format, etc.  It would have to be modified to send cdb commands instead.  But if this feature is added to cb, it's probably a good idea to just seperate out the cb ui part and the debugger specific part so that it would be easy to integrate various command line debuggers.  Maybe submit a feature request to support cdb in a future version?