Breakpoints
Niko Sams
niko.sams at gmail.com
Wed Apr 15 18:37:11 UTC 2009
On Wed, Apr 15, 2009 at 10:54 AM, Vladimir Prus <ghost at cs.msu.su> wrote:
> 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' (*).
How should the user create such a breakpoint - UI-wise?
> - no KDevelop::Breakpoint::maybeSend
> What code will be sending breakpoints in that case?
a new class in the gdb plugin; GdbBreakpointController (as mentioned below)
>> - no KDevelop::Breakpoint::dirty_, KDevelop::Breakpoint::errors_
> Just to clarify -- how the corresponding state will be displayed in the
> breakpoint table otherwise?
you mean the dirty-state? KDevelop::BreakpointController has to ask
the _current_
DebugSession about this state.
>> - 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).
yes - that was my approach. I'm not sure if it's working
Imo we have two options:
- every plugin has it's own Breakpoint class(es)
o when adding a breakpoint we must know the plugin where we create
that breakpoint (this is actually my main problem)
- we have a common breakpoint class that works across all debuggers
o there could still be per-plugin special-breakpoint classes (that
works for it's own plugin only)
Niko
More information about the KDevelop-devel
mailing list