Debugger: Re-work breakpoint storage handling

The actual data is now in a TreeModel. As interface to
individual breakpoints there's a new Breakpoint class
essentially providing a checked handle.

On the user code side breakHandler()->foo(bpId) is
replaced by bp.foo().

Change-Id: I82f435bad6301fce85a1d82bf6bf39e9ddba511e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-01-10 01:07:01 +01:00
parent b88cdef0a3
commit 3b2d2eae17
28 changed files with 1320 additions and 1391 deletions

View File

@@ -34,7 +34,6 @@
#include "debugger_global.h"
#include "debuggerconstants.h"
#include "debuggerstartparameters.h"
#include "breakpoint.h" // For BreakpointModelId.
#include "threaddata.h" // For ThreadId.
#include <QObject>
@@ -71,7 +70,7 @@ class StackFrame;
class SourceFilesHandler;
class ThreadsHandler;
class WatchHandler;
class BreakpointParameters;
class Breakpoint;
class QmlAdapter;
class QmlCppEngine;
class DebuggerToolTipContext;
@@ -193,13 +192,12 @@ public:
virtual void createSnapshot();
virtual void updateAll();
typedef Internal::BreakpointModelId BreakpointModelId;
virtual bool stateAcceptsBreakpointChanges() const { return true; }
virtual void attemptBreakpointSynchronization();
virtual bool acceptsBreakpoint(BreakpointModelId id) const = 0;
virtual void insertBreakpoint(BreakpointModelId id); // FIXME: make pure
virtual void removeBreakpoint(BreakpointModelId id); // FIXME: make pure
virtual void changeBreakpoint(BreakpointModelId id); // FIXME: make pure
virtual bool acceptsBreakpoint(Breakpoint bp) const = 0;
virtual void insertBreakpoint(Breakpoint bp); // FIXME: make pure
virtual void removeBreakpoint(Breakpoint bp); // FIXME: make pure
virtual void changeBreakpoint(Breakpoint bp); // FIXME: make pure
virtual bool acceptsDebuggerCommands() const { return true; }
virtual void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
@@ -355,16 +353,6 @@ protected:
DebuggerRunControl *runControl() const;
static QString msgWatchpointByAddressTriggered(BreakpointModelId id,
int number, quint64 address);
static QString msgWatchpointByAddressTriggered(BreakpointModelId id,
int number, quint64 address, const QString &threadId);
static QString msgWatchpointByExpressionTriggered(BreakpointModelId id,
int number, const QString &expr);
static QString msgWatchpointByExpressionTriggered(BreakpointModelId id,
int number, const QString &expr, const QString &threadId);
static QString msgBreakpointTriggered(BreakpointModelId id,
int number, const QString &threadId);
static QString msgStopped(const QString &reason = QString());
static QString msgStoppedBySignal(const QString &meaning, const QString &name);
static QString msgStoppedByException(const QString &description,