Debugger MI port

Vladimir Prus ghost at cs.msu.su
Mon Jan 30 13:38:04 UTC 2006


Hi,
I've just created a branch for the work to make KDevelop's debugger frontend 
use gdb's MI protocol, as opposed to command line protocol.

The MI protcol is designed to be machine readable, and it's much easier to 
extract information from MI responses, which will simplify implementation of 
new features. For example, I already have a code to report, for watchpoints, 
the old and the new values of the watched expression. Extracting the return 
value of a function, on "finish" command, is also trivial and so on.

MI will also increase robustness. Right now, all error messages from gdb are 
just ignored, without notification with the user. In addition, sometimes 
error messages mix with normal output and blow up the parser. Both problems 
will be gone -- I intend for all error messages from gdb to result in error 
message box.

Of course, there are downsides. MI at the moment is immature protocol and has 
certain omissions. The documentation is pretty weak as well. However I hope 
I'll be able to workaround this.

The branch is:

    http://websvn.kde.org/branches/work/kdevelop-debugger-mi/

At the current state you can set breakpoint on main, run the program, step 
though it, and watch variables. Breakpoints are half-broken, everything else 
was not tested, and the only testcase I've tried with is:

    http://websvn.kde.org/branches/work/kdevelop-debugger-mi/tests/two_module/

So, it's too early to try the branch for real work, but if anybody wants to 
help with coding, or just watch what's going on, he's welcome.

- Volodya





More information about the KDevelop-devel mailing list