debugger: The DebuggerEngine refactoring.

This replaces the (de facto) singleton engines and data handlers by classes
that are instantiated per run. The DebuggerRunControl will now create an
object of (a class derived from) DebuggerEngine that contains all the relevant
"dynamic" data.

DebuggerManager is no more. The "singleton" bits are merged into DebuggerPlugin,
whereas the data bits went to DebuggerEngine.

There is no formal notion of a "current" DebuggerEngine. However, as there's
only one DebuggerEngine at a time that has its data models connected to the
view, there's still some "de facto" notion of a "current" engine. Calling
SomeModel::setData(int role, QVariant data) with custom role is used as the
primary dispatch mechanism from the views to the "current" data models
(and the engine, as all data models know their engine).
This commit is contained in:
hjk
2010-06-16 11:08:54 +02:00
parent 4cc244469a
commit 6a6cba5518
93 changed files with 5258 additions and 4846 deletions

View File

@@ -34,15 +34,14 @@
#include <QtCore/QPointer>
namespace Core {
class IEditor;
class IEditor;
}
namespace Debugger {
class DebuggerManager;
namespace Debugger {
namespace Internal {
struct StackFrame;
class IDebuggerEngine;
struct DisassemblerViewAgentPrivate;
class DebuggerEngine;
class StackFrame;
class MemoryViewAgent : public QObject
{
@@ -50,8 +49,8 @@ class MemoryViewAgent : public QObject
public:
// Called from Gui
explicit MemoryViewAgent(DebuggerManager *manager, quint64 startaddr);
explicit MemoryViewAgent(DebuggerManager *manager, const QString &startaddr);
explicit MemoryViewAgent(DebuggerEngine *engine, quint64 startaddr);
explicit MemoryViewAgent(DebuggerEngine *engine, const QString &startaddr);
~MemoryViewAgent();
enum { BinBlockSize = 1024 };
@@ -65,19 +64,20 @@ public slots:
private:
Q_SLOT void createBinEditor(quint64 startAddr);
QPointer<IDebuggerEngine> m_engine;
QList<QPointer<Core::IEditor> > m_editors;
QPointer<DebuggerManager> m_manager;
QPointer<DebuggerEngine> m_engine;
};
class DisassemblerViewAgentPrivate;
class DisassemblerViewAgent : public QObject
{
Q_OBJECT
public:
// Called from Gui
explicit DisassemblerViewAgent(DebuggerManager *manager);
explicit DisassemblerViewAgent(DebuggerEngine *engine);
~DisassemblerViewAgent();
void setFrame(const StackFrame &frame, bool tryMixed = true);