[gvd-devel] Making GVD the graphical end of an existing textual debugger

Emmanuel Briot briot@gnat.com
Wed, 2 May 2001 14:33:27 +0200


 > I'm developing a command line debugger for a specific internal project at
 > Intel.

What particular features/differences does it have with regards to gdb ?
For instance, I assume there is a "backtrace" function, there are some "print"
functions for variables,...
Does the debugger report every time the current file has changed in an
easy-to-detect way ?


 > Would it be possible to extend GVD to be the graphical end of our
 > textual debugger?  How complex would it be?  Is there documentation of
 > similar projects?

Extended gvd should definitely be feasible. We have taken great care to isolate
all the debugger-specific features into specific package. Of course, this
assumes that you know at least a little bit of Ada (basically, you shouldn't
have too many problems if you know Pascal, since you don't have a lot of design
to do here, you only need to put your code into a set of predefined
subprograms).

I would recommend to start from the packages defined for Jdb (the Java
debugger). Since our support for jdb is fairly light, these packages are easy
to understand and to add to.

Getting the basic "run", "step", "backtrace",... functions can probably be done
failry quickly. However, one of the most difficult thing will probably be to
add support for parsing the output of the "print" function from the
debugger. Having a "ptype" function definitely helps, but is not mandatory.

If you are developping the debugger, I would recommend having a special mode
when outputting variables to make the parsing easy.

All the functions should be fairly well documented. When in doubt, look at the
implementation we did for gdb, since this is the reference implementation.

I don't know that adding a new debugger to GVD has already been done by someone
else that the GVD team, however we would love to add this. There are some other
debuggers that are fairly well used besides gdb, and it would be nice to add
support for them. Please report all the problems you might have, so that we
can either change the interface to make it easier, or at least add some
documentation.

Emmanuel