Breakpoints

Vladimir Prus ghost at cs.msu.su
Wed Apr 15 08:54:10 UTC 2009


On Wednesday 15 April 2009 10:42:54 Niko Sams wrote:
> > I don't understand the point about single breakpoint class -- it
> > seems independent from per-config/global discussion.
> because of GDBDebugger::Breakpoint::maybeSend. If we don't know to which
> Plugin a breakpoint belongs - we can't use a plugin-specific breakpoint class.

Well, I imagine that no matter what we do, we might want to have specialized
breakpoints that are tightly coupled with specific debugger. Say, one debugger
might have 'break when function seem to messup callee-saved registers' (*).
It would not make much sense to implement generic breakpoint of such kind,
so it should be possible to have plugin-specific breakpoint classes, and
avoid sending such breakpoints to random plugins.

(*) It's a real example.

> >> 2. per project / global
> >> - gdb-plugin has to be ported, code moded out of breakpoint class
> >> - much more flexible (easy to implement breakpoints per config, or -
> >> as david suggested a brekpoint-set combobox)
> >
> > FWIW, I think breakpoint-set -- as a new concept in addition to project
> > and launch config -- will just complicate the conceptual model.
> >
> >> - actually i'm working already on this
> >
> > Maybe, you can give more details how it will work? I don't mind in principle
> > trying something can be be easily tweaked later -- but the details matter.
> - single instance of KDevelop::BreakpointController and
> KDevelop::Breakpoints in kdevplatform
> - no KDevelop::Breakpoint::maybeSend

What code will be sending breakpoints in that case?

> - no KDevelop::Breakpoint::dirty_, KDevelop::Breakpoint::errors_

Just to clarify -- how the corresponding state will be displayed in the
breakpoint table otherwise?

> - a GDBDebugger::GdbBrekpointController (inherits QObject) per DebugSession
> - GdbBreakpointController adds the GDBCommands for sending the breakpoints

So, in essence, you suggest that sending of breakpoint to debugger be handled
by a class different from breakpoint itself? This seems to be right approach
for breakpoints of generic kinds (line:number, say), and is probably ok
for custom breakpoint classes (where debugger-specific controller may just
dynamic_cast to some types and act accordingly).

- Volodya




More information about the KDevelop-devel mailing list