Debugger library

Andreas Pakulat apaku at gmx.de
Sun Mar 15 15:23:56 UTC 2009


On 15.03.09 15:51:28, Niko Sams wrote:
> Hi,
> 
> I'm working on a php debugger, and want to reuse parts of the gdb
> debugger - apol created
> a few abstract classes (IBreakpointController, IBreakpoints,
> INewBreakpoint) but they are
> still inside gdb. Where should I move them so they can be used by my plugin?

Feel free to create kdevplatform/debugger as shared library.
 
> The second problem I have is that I have to duplicate all debugger
> actions - and we then
> have Start, Restart, Step Over, etc twice.

Please don't :) Why can they not be in the runcontroller (or a debugger
controller if its getting too much code) and that one would emit signals
when the user hits the actions, including the run-info for whatever app is
being debugged.

> The start might have to stay - as a way to say with which debugger the
> target should
> be started.

Shouldn't this rather be a property of the "run configuration" (probably an
implicit thing, hidden from the user depending on the actual run type thats
being created).

> Same problem with ToggleBreakpoint, RunToCursor and the breakpoints
> themselfe. Although
> it might be ok to have breakpoints in all debugger plugins if the user
> adds them.

It shouldn't be a problem if you tell gdb to set a breakpoint that it
cannot handle, it'll just throw an error. Probably the same with php. Of
course it would be nice if we could know before setting a breakpoint in the
debugger wether it belongs to a file thats being compiled/used in a
particular application. 

> A solution could be a DebuggerUI-Plugin that implements an interface -
> that all debuggers can use.
> What do you think?

That could be a possibility, provide the common ui in a plugin, which is
based on some interfaces and controller's provided as libraries and the
actual debugger implementations just provide implementations for those
interfaces...

Andreas

-- 
Your depth of comprehension may tend to make you lax in worldly ways.




More information about the KDevelop-devel mailing list