LocalsPointerValueRole, // Pointer value (address) as quint64
LocalsIsWatchpointAtAddressRole,
LocalsIsWatchpointAtPointerValueRole,
- RequestShowInEditorRole,
- RequestWatchPointRole,
- RequestToggleWatchRole,
- RequestToolTipByExpressionRole,
- RequestClearCppCodeModelSnapshotRole,
- RequestWatchExpressionRole,
- RequestRemoveWatchExpressionRole,
-
- // Stack
- StackFrameAddressRole,
- RequestActivateFrameRole,
- RequestReloadFullStackRole,
- RequestShowMemoryRole,
- RequestShowDisassemblerRole,
-
- // Modules
- RequestReloadModulesRole,
- RequestExamineModulesRole,
- RequestModuleSymbolsRole,
- RequestAllSymbolsRole,
- RequestOpenFileRole,
// Snapshots
SnapshotCapabilityRole,
- RequestCreateSnapshotRole,
- RequestActivateSnapshotRole,
- RequestRemoveSnapshotRole,
-
- // Sources
- RequestReloadSourceFilesRole,
};
enum DebuggerEngineType
m_lastGoodState(DebuggerNotReady),
m_targetState(DebuggerNotReady),
m_commandHandler(engine),
- m_modulesHandler(engine),
+ m_modulesHandler(),
m_registerHandler(),
- m_sourceFilesHandler(engine),
- m_stackHandler(engine),
+ m_sourceFilesHandler(),
+ m_stackHandler(),
m_threadsHandler(),
m_watchHandler(engine),
m_disassemblerViewAgent(engine),
void doInterruptInferior();
void doFinishDebugger();
- void queueRunEngine() {
+ void queueRunEngine()
+ {
m_engine->setState(EngineRunRequested);
m_engine->showMessage(_("QUEUE: RUN ENGINE"));
QTimer::singleShot(0, this, SLOT(doRunEngine()));
}
- void queueShutdownEngine() {
+ void queueShutdownEngine()
+ {
m_engine->setState(EngineShutdownRequested);
m_engine->showMessage(_("QUEUE: SHUTDOWN ENGINE"));
QTimer::singleShot(0, this, SLOT(doShutdownEngine()));
}
- void queueShutdownInferior() {
+ void queueShutdownInferior()
+ {
m_engine->setState(InferiorShutdownRequested);
m_engine->showMessage(_("QUEUE: SHUTDOWN INFERIOR"));
QTimer::singleShot(0, this, SLOT(doShutdownInferior()));
}
- void queueFinishDebugger() {
+ void queueFinishDebugger()
+ {
QTC_ASSERT(state() == EngineShutdownOk
|| state() == EngineShutdownFailed, qDebug() << state());
m_engine->setState(DebuggerFinished);
QTimer::singleShot(0, this, SLOT(doFinishDebugger()));
}
- void raiseApplication() {
+ void raiseApplication()
+ {
QTC_ASSERT(m_runControl, return);
m_runControl->bringApplicationToForeground(m_inferiorPid);
}
void DebuggerEngine::handleCommand(int role, const QVariant &value)
{
- if (role != RequestToolTipByExpressionRole)
- removeTooltip();
+ removeTooltip();
switch (role) {
- case RequestActivateFrameRole:
- activateFrame(value.toInt());
- break;
-
- case RequestReloadFullStackRole:
- reloadFullStack();
- break;
-
- case RequestReloadSourceFilesRole:
- reloadSourceFiles();
- break;
-
- case RequestReloadModulesRole:
- reloadModules();
- break;
-
- //case RequestReloadRegistersRole:
- // reloadRegisters();
- // break;
-
case RequestExecDetachRole:
detachDebugger();
break;
d->queueShutdownInferior();
break;
- case RequestCreateSnapshotRole:
- createSnapshot();
- break;
-
case RequestActivationRole:
setActive(value.toBool());
break;
executeDebuggerCommand(value.toString());
break;
- case RequestToolTipByExpressionRole: {
- QList<QVariant> list = value.toList();
- QTC_ASSERT(list.size() == 3, break);
- QPoint point = list.at(0).value<QPoint>();
- TextEditor::ITextEditor *editor = // Eeks.
- (TextEditor::ITextEditor *)(list.at(1).value<quint64>());
- int pos = list.at(2).toInt();
- setToolTipExpression(point, editor, pos);
- break;
- }
-
case RequestContextMenuRole: {
QList<QVariant> list = value.toList();
QTC_ASSERT(list.size() == 3, break);
d->handleContextMenuRequest(list);
break;
}
-
- case RequestShowMemoryRole: {
- qDebug() << "CREATING MEMORY VIEW";
- (void) MemoryViewAgent(this, "0x0");
- break;
- }
}
}
QAction *jumpToLineAction; // in the Debug menu
QAction *returnFromFunctionAction;
QAction *nextAction;
- QAction *snapshotAction;
+ //QAction *snapshotAction;
QAction *watchAction1; // in the Debug menu
QAction *watchAction2; // in the text editor context menu
QAction *breakAction;
void notifyCurrentEngine(int role, const QVariant &value = QVariant());
void connectEngine(DebuggerEngine *engine, bool notify = true);
void disconnectEngine() { connectEngine(0); }
+ DebuggerEngine *currentEngine() const { return m_currentEngine; }
public slots:
void updateWatchersHeader(int section, int, int newSize)
- { m_watchersWindow->header()->resizeSection(section, newSize); }
+ {
+ m_watchersWindow->header()->resizeSection(section, newSize);
+ }
void sourceFilesDockToggled(bool on)
- { if (on) notifyCurrentEngine(RequestReloadSourceFilesRole); }
+ {
+ if (on)
+ m_currentEngine->reloadSourceFiles();
+ }
+
void modulesDockToggled(bool on)
- { if (on) notifyCurrentEngine(RequestReloadModulesRole); }
+ {
+ if (on)
+ m_currentEngine->reloadModules();
+ }
void registerDockToggled(bool on)
{
- if (on && m_currentEngine)
+ if (on)
m_currentEngine->reloadRegisters();
}
m_registerWindow = new RegisterWindow;
m_registerWindow->setObjectName(QLatin1String("CppDebugRegisters"));
- m_snapshotWindow = new SnapshotWindow;
- m_snapshotWindow->setObjectName(QLatin1String("CppDebugSnapshots"));
m_stackWindow = new StackWindow;
m_stackWindow->setObjectName(QLatin1String("CppDebugStack"));
m_sourceFilesWindow = new SourceFilesWindow;
// Snapshot
m_snapshotHandler = new SnapshotHandler;
+ m_snapshotWindow = new SnapshotWindow(m_snapshotHandler);
+ m_snapshotWindow->setObjectName(QLatin1String("CppDebugSnapshots"));
m_snapshotWindow->setModel(m_snapshotHandler->model());
// Debug mode setup
m_actions.watchAction2 = new QAction(tr("Add to Watch Window"), this);
m_actions.watchAction2->setProperty(Role, RequestExecWatchRole);
- m_actions.snapshotAction = new QAction(tr("Create Snapshot"), this);
- m_actions.snapshotAction->setProperty(Role, RequestCreateSnapshotRole);
- m_actions.snapshotAction->setIcon(
- QIcon(__(":/debugger/images/debugger_snapshot_small.png")));
+ //m_actions.snapshotAction = new QAction(tr("Create Snapshot"), this);
+ //m_actions.snapshotAction->setProperty(Role, RequestCreateSnapshotRole);
+ //m_actions.snapshotAction->setIcon(
+ // QIcon(__(":/debugger/images/debugger_snapshot_small.png")));
m_actions.reverseDirectionAction =
new QAction(tr("Reverse Direction"), this);
connect(m_actions.returnFromFunctionAction, SIGNAL(triggered()), SLOT(onAction()));
connect(m_actions.watchAction1, SIGNAL(triggered()), SLOT(onAction()));
connect(m_actions.watchAction2, SIGNAL(triggered()), SLOT(onAction()));
- connect(m_actions.snapshotAction, SIGNAL(triggered()), SLOT(onAction()));
+ //connect(m_actions.snapshotAction, SIGNAL(triggered()), SLOT(onAction()));
connect(m_actions.frameDownAction, SIGNAL(triggered()), SLOT(onAction()));
connect(m_actions.frameUpAction, SIGNAL(triggered()), SLOT(onAction()));
connect(m_actions.stopAction, SIGNAL(triggered()), SLOT(onAction()));
m_uiSwitcher->addMenuAction(cmd, CppLanguage);
- cmd = am->registerAction(m_actions.snapshotAction,
- Constants::SNAPSHOT, cppDebuggercontext);
- cmd->setDefaultKeySequence(QKeySequence(Constants::SNAPSHOT_KEY));
- cmd->setAttribute(Command::CA_Hide);
- m_uiSwitcher->addMenuAction(cmd, CppLanguage);
+ //cmd = am->registerAction(m_actions.snapshotAction,
+ // Constants::SNAPSHOT, cppDebuggercontext);
+ //cmd->setDefaultKeySequence(QKeySequence(Constants::SNAPSHOT_KEY));
+ //cmd->setAttribute(Command::CA_Hide);
+ //m_uiSwitcher->addMenuAction(cmd, CppLanguage);
cmd = am->registerAction(m_actions.frameDownAction,
Constants::FRAME_DOWN, cppDebuggercontext);
toggleBreakpoint(editor->file()->fileName(), lineNumber);
}
-void DebuggerPluginPrivate::showToolTip(ITextEditor *editor, const QPoint &point, int pos)
+void DebuggerPluginPrivate::showToolTip(ITextEditor *editor,
+ const QPoint &point, int pos)
{
if (!isDebuggable(editor))
return;
return;
if (state() != InferiorStopOk)
return;
-
- QList<QVariant> list;
- list.append(point);
- list.append(quint64(editor));
- list.append(pos);
- notifyCurrentEngine(RequestToolTipByExpressionRole, list);
+ currentEngine()->setToolTipExpression(point, editor, pos);
}
DebuggerRunControl *DebuggerPluginPrivate::createDebugger
m_actions.watchAction1->setEnabled(true);
m_actions.watchAction2->setEnabled(true);
m_actions.breakAction->setEnabled(true);
- m_actions.snapshotAction->setEnabled(false);
+ //m_actions.snapshotAction->setEnabled(false);
theDebuggerAction(OperateByInstruction)->setEnabled(false);
m_actions.stopAction->setEnabled(false);
m_actions.watchAction1->setEnabled(true);
m_actions.watchAction2->setEnabled(true);
m_actions.breakAction->setEnabled(true);
- m_actions.snapshotAction->setEnabled(stopped && (caps & SnapshotCapability));
+ //m_actions.snapshotAction->setEnabled(stopped && (caps & SnapshotCapability));
theDebuggerAction(OperateByInstruction)->setEnabled(stopped);
void DebuggerPluginPrivate::openMemoryEditor()
{
AddressDialog dialog;
- if (dialog.exec() != QDialog::Accepted)
- return;
- QTC_ASSERT(m_watchersWindow, return);
- m_watchersWindow->model()->setData(
- QModelIndex(), dialog.address(), RequestShowMemoryRole);
+ if (dialog.exec() == QDialog::Accepted)
+ (void) new MemoryViewAgent(currentEngine(), dialog.address());
}
void DebuggerPluginPrivate::coreShutdown()
return d->m_breakHandler;
}
+Internal::SnapshotHandler *DebuggerPlugin::snapshotHandler() const
+{
+ return d->m_snapshotHandler;
+}
+
DebuggerEngine *DebuggerPlugin::currentEngine() const
{
return d->m_currentEngine;
namespace Internal {
class BreakHandler;
+class SnapshotHandler;
}
class DEBUGGER_EXPORT DebuggerPlugin : public ExtensionSystem::IPlugin
void openTextEditor(const QString &titlePattern, const QString &contents);
Internal::BreakHandler *breakHandler() const;
+ Internal::SnapshotHandler *snapshotHandler() const;
DebuggerEngine *currentEngine() const;
public slots:
**************************************************************************/
#include "moduleshandler.h"
-#include "debuggerengine.h"
#include <utils/qtcassert.h>
namespace Debugger {
namespace Internal {
-class ModulesModel : public QAbstractItemModel
-{ // Needs tr - context.
- Q_OBJECT
-public:
- explicit ModulesModel(ModulesHandler *parent, DebuggerEngine *engine);
-
- // QAbstractItemModel
- int columnCount(const QModelIndex &parent) const
- { return parent.isValid() ? 0 : 5; }
- int rowCount(const QModelIndex &parent) const
- { return parent.isValid() ? 0 : m_modules.size(); }
- QModelIndex parent(const QModelIndex &) const { return QModelIndex(); }
- QModelIndex index(int row, int column, const QModelIndex &) const
- { return createIndex(row, column); }
- QVariant headerData(int section, Qt::Orientation orientation, int role) const;
- QVariant data(const QModelIndex &index, int role) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role);
-
- void clearModel();
- void addModule(const Module &module);
- void removeModule(const QString &moduleName);
- void setModules(const Modules &modules);
- void updateModule(const QString &moduleName, const Module &module);
-
- const Modules &modules() const { return m_modules; }
-
-private:
- int indexOfModule(const QString &name) const;
-
- DebuggerEngine *m_engine;
- Modules m_modules;
-};
-
-ModulesModel::ModulesModel(ModulesHandler *parent, DebuggerEngine *engine)
- : QAbstractItemModel(parent), m_engine(engine)
+ModulesModel::ModulesModel(ModulesHandler *parent)
+ : QAbstractItemModel(parent)
{}
QVariant ModulesModel::headerData(int section,
QVariant ModulesModel::data(const QModelIndex &index, int role) const
{
- if (role == EngineCapabilitiesRole)
- return m_engine->debuggerCapabilities();
-
- if (role == EngineActionsEnabledRole)
- return m_engine->debuggerActionsEnabled();
-
int row = index.row();
if (row < 0 || row >= m_modules.size())
return QVariant();
return QVariant();
}
-bool ModulesModel::setData(const QModelIndex &index, const QVariant &value, int role)
-{
- Q_UNUSED(index);
-
- switch (role) {
- case RequestReloadModulesRole:
- m_engine->reloadModules();
- return true;
-
- case RequestExamineModulesRole:
- m_engine->examineModules();
- return true;
-
- case RequestModuleSymbolsRole:
- m_engine->loadSymbols(value.toString());
- return true;
-
- case RequestAllSymbolsRole:
- m_engine->loadAllSymbols();
- return true;
-
- case RequestOpenFileRole:
- m_engine->openFile(value.toString());
- return true;
- }
- return false;
-}
-
void ModulesModel::addModule(const Module &m)
{
beginInsertRows(QModelIndex(), m_modules.size(), m_modules.size());
//
//////////////////////////////////////////////////////////////////
-ModulesHandler::ModulesHandler(DebuggerEngine *engine)
+ModulesHandler::ModulesHandler()
{
- m_model = new ModulesModel(this, engine);
+ m_model = new ModulesModel(this);
m_proxyModel = new QSortFilterProxyModel(this);
m_proxyModel->setSourceModel(m_model);
}
} // namespace Internal
} // namespace Debugger
-#include "moduleshandler.moc"
#include <QtCore/QList>
#include <QtCore/QObject>
-
-QT_BEGIN_NAMESPACE
-class QAbstractItemModel;
-class QSortFilterProxyModel;
-QT_END_NAMESPACE
+#include <QtGui/QSortFilterProxyModel>
namespace Debugger {
-
-class DebuggerEngine;
-
namespace Internal {
class ModulesModel;
+class ModulesHandler;
+
//////////////////////////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////////
//
+// ModulesModel
+//
+//////////////////////////////////////////////////////////////////
+
+class ModulesModel : public QAbstractItemModel
+{
+ // Needs tr - context.
+ Q_OBJECT
+public:
+ ModulesModel(ModulesHandler *parent);
+
+ // QAbstractItemModel
+ int columnCount(const QModelIndex &parent) const
+ { return parent.isValid() ? 0 : 5; }
+ int rowCount(const QModelIndex &parent) const
+ { return parent.isValid() ? 0 : m_modules.size(); }
+ QModelIndex parent(const QModelIndex &) const { return QModelIndex(); }
+ QModelIndex index(int row, int column, const QModelIndex &) const
+ { return createIndex(row, column); }
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+ QVariant data(const QModelIndex &index, int role) const;
+
+ void clearModel();
+ void addModule(const Module &module);
+ void removeModule(const QString &moduleName);
+ void setModules(const Modules &modules);
+ void updateModule(const QString &moduleName, const Module &module);
+
+ const Modules &modules() const { return m_modules; }
+
+private:
+ int indexOfModule(const QString &name) const;
+
+ Modules m_modules;
+};
+
+
+//////////////////////////////////////////////////////////////////
+//
// ModulesHandler
//
//////////////////////////////////////////////////////////////////
Q_OBJECT
public:
- explicit ModulesHandler(DebuggerEngine *engine);
+ ModulesHandler();
QAbstractItemModel *model() const;
#include "moduleswindow.h"
-#include "debuggerconstants.h"
#include "debuggeractions.h"
+#include "debuggerconstants.h"
+#include "debuggerengine.h"
+#include "debuggerplugin.h"
#include <utils/qtcassert.h>
#include <utils/savedaction.h>
namespace Debugger {
namespace Internal {
+static DebuggerEngine *currentEngine()
+{
+ return DebuggerPlugin::instance()->currentEngine();
+}
+
ModulesWindow::ModulesWindow(QWidget *parent)
: QTreeView(parent), m_alwaysResizeColumnsToContents(false)
{
setIconSize(QSize(10, 10));
connect(this, SIGNAL(activated(QModelIndex)),
- this, SLOT(moduleActivated(QModelIndex)));
+ SLOT(moduleActivated(QModelIndex)));
connect(act, SIGNAL(toggled(bool)),
- this, SLOT(setAlternatingRowColorsHelper(bool)));
+ SLOT(setAlternatingRowColorsHelper(bool)));
}
void ModulesWindow::moduleActivated(const QModelIndex &index)
{
- qDebug() << "ACTIVATED: " << index.row() << index.column()
- << index.data().toString();
- setModelData(RequestOpenFileRole, index.data().toString());
+ currentEngine()->openFile(index.data().toString());
}
void ModulesWindow::resizeEvent(QResizeEvent *event)
if (index.isValid())
name = index.data().toString();
- const bool enabled =
- model() && model()->data(index, EngineActionsEnabledRole).toBool();
- const unsigned capabilities =
- model()->data(index, EngineCapabilitiesRole).toInt();
+ DebuggerEngine *engine = currentEngine();
+ const bool enabled = engine->debuggerActionsEnabled();
+ const unsigned capabilities = engine->debuggerCapabilities();
QMenu menu;
QAction *act = menu.exec(ev->globalPos());
if (act == actUpdateModuleList) {
- setModelData(RequestReloadModulesRole);
+ engine->reloadModules();
} else if (act == actAdjustColumnWidths) {
resizeColumnsToContents();
} else if (act == actAlwaysAdjustColumnWidth) {
//} else if (act == actShowSourceFiles) {
// emit displaySourceRequested(name);
} else if (act == actLoadSymbolsForAllModules) {
- setModelData(RequestAllSymbolsRole);
+ engine->loadAllSymbols();
} else if (act == actExamineAllModules) {
- setModelData(RequestExamineModulesRole);
+ engine->examineModules();
} else if (act == actLoadSymbolsForModule) {
- setModelData(RequestModuleSymbolsRole, name);
+ engine->loadSymbols(name);
} else if (act == actEditFile) {
- setModelData(RequestOpenFileRole, name);
+ engine->openFile(name);
} else if (act == actShowSymbols) {
- setModelData(RequestModuleSymbolsRole, name);
+ // FIXME setModelData(RequestModuleSymbolsRole, name);
}
}
setAlwaysResizeColumnsToContents(true);
}
-void ModulesWindow::setModelData
- (int role, const QVariant &value, const QModelIndex &index)
-{
- QTC_ASSERT(model(), return);
- model()->setData(index, value, role);
-}
-
} // namespace Internal
} // namespace Debugger
void resizeEvent(QResizeEvent *ev);
void contextMenuEvent(QContextMenuEvent *ev);
void setModel(QAbstractItemModel *model);
- void setModelData(int role, const QVariant &value = QVariant(),
- const QModelIndex &index = QModelIndex());
bool m_alwaysResizeColumnsToContents;
};
case Qt::ToolTipRole:
return QVariant();
- case Qt::DecorationRole: // Return icon that indicates whether this is the active stack frame
+ case Qt::DecorationRole:
+ // Return icon that indicates whether this is the active stack frame.
if (index.column() == 0)
return (index.row() == m_currentIndex) ? m_positionIcon : m_emptyIcon;
break;
return true ? QAbstractTableModel::flags(index) : Qt::ItemFlags(0);
}
-bool SnapshotHandler::setData
- (const QModelIndex &index, const QVariant &value, int role)
+void SnapshotHandler::activateSnapshot(int index)
{
- Q_UNUSED(value);
- if (index.isValid() && role == RequestCreateSnapshotRole) {
- DebuggerEngine *engine = engineAt(index.row());
- QTC_ASSERT(engine, return false);
- engine->createSnapshot();
- return true;
- }
- if (index.isValid() && role == RequestActivateSnapshotRole) {
- m_currentIndex = index.row();
- //qDebug() << "ACTIVATING INDEX: " << m_currentIndex << " OF " << size();
- DebuggerPlugin::displayDebugger(m_snapshots.at(m_currentIndex));
- reset();
- return true;
- }
- if (index.isValid() && role == RequestRemoveSnapshotRole) {
- DebuggerEngine *engine = engineAt(index.row());
- //qDebug() << "REMOVING " << engine;
- QTC_ASSERT(engine, return false);
- engine->quitDebugger();
- return true;
- }
- return false;
+ m_currentIndex = index;
+ //qDebug() << "ACTIVATING INDEX: " << m_currentIndex << " OF " << size();
+ DebuggerPlugin::displayDebugger(m_snapshots.at(index));
+ reset();
}
+void SnapshotHandler::createSnapshot(int index)
+{
+ DebuggerEngine *engine = engineAt(index);
+ QTC_ASSERT(engine, return);
+ engine->createSnapshot();
+}
+
+void SnapshotHandler::removeSnapshot(int index)
+{
+ DebuggerEngine *engine = engineAt(index);
+ //qDebug() << "REMOVING " << engine;
+ QTC_ASSERT(engine, return);
#if 0
// See http://sourceware.org/bugzilla/show_bug.cgi?id=11241.
setState(EngineSetupRequested);
postCommand("set stack-cache off");
#endif
+ QString fileName = engine->startParameters().coreFile;
+ //if (!fileName.isEmpty())
+ // QFile::remove(fileName);
+ m_snapshots.removeAt(index);
+ if (index == m_currentIndex)
+ m_currentIndex = -1;
+ else if (index < m_currentIndex)
+ --m_currentIndex;
+ engine->quitDebugger();
+ reset();
+}
+
void SnapshotHandler::removeAll()
{
removeSnapshot(index);
}
-void SnapshotHandler::removeSnapshot(int index)
-{
- const DebuggerEngine *engine = engineAt(index);
- QTC_ASSERT(engine, return);
- QString fileName = engine->startParameters().coreFile;
- //if (!fileName.isEmpty())
- // QFile::remove(fileName);
- m_snapshots.removeAt(index);
- if (index == m_currentIndex)
- m_currentIndex = -1;
- else if (index < m_currentIndex)
- --m_currentIndex;
- reset();
-}
-
void SnapshotHandler::setCurrentIndex(int index)
{
m_currentIndex = index;
void removeSnapshot(DebuggerRunControl *rc);
void setCurrentIndex(int index);
int size() const { return m_snapshots.size(); }
- DebuggerRunControl *at(int i) const;
- QList<DebuggerRunControl*> runControls() const;
+ DebuggerRunControl *at(int index) const;
+ QList<DebuggerRunControl *> runControls() const;
+
+ void createSnapshot(int index);
+ void activateSnapshot(int index);
+ void removeSnapshot(int index);
private:
// QAbstractTableModel
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role);
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
Q_SLOT void resetModel() { reset(); }
DebuggerEngine *engineAt(int i) const;
- void removeSnapshot(int index);
int m_currentIndex;
QList< QPointer<DebuggerRunControl> > m_snapshots;
**************************************************************************/
#include "snapshotwindow.h"
+#include "snapshothandler.h"
#include "debuggeractions.h"
#include "debuggerconstants.h"
//
///////////////////////////////////////////////////////////////////////
-SnapshotWindow::SnapshotWindow(QWidget *parent)
- : QTreeView(parent), m_alwaysResizeColumnsToContents(false)
+SnapshotWindow::SnapshotWindow(SnapshotHandler *handler)
+ : m_alwaysResizeColumnsToContents(false)
{
+ m_snapshotHandler = handler;
+
QAction *act = theDebuggerAction(UseAlternatingRowColors);
setWindowTitle(tr("Snapshots"));
setAttribute(Qt::WA_MacShowFocusRect, false);
header()->setDefaultAlignment(Qt::AlignLeft);
connect(this, SIGNAL(activated(QModelIndex)),
- this, SLOT(rowActivated(QModelIndex)));
+ SLOT(rowActivated(QModelIndex)));
connect(act, SIGNAL(toggled(bool)),
- this, SLOT(setAlternatingRowColorsHelper(bool)));
-}
-
-SnapshotWindow::~SnapshotWindow()
-{
+ SLOT(setAlternatingRowColorsHelper(bool)));
}
void SnapshotWindow::rowActivated(const QModelIndex &index)
-{
- model()->setData(index, index.row(), RequestActivateSnapshotRole);
-}
-
-void SnapshotWindow::removeSnapshots(const QModelIndexList &indexes)
-{
- QTC_ASSERT(!indexes.isEmpty(), return);
- foreach (const QModelIndex &idx, indexes)
- model()->setData(idx, QVariant(), RequestRemoveSnapshotRole);
+{
+ m_snapshotHandler->activateSnapshot(index.row());
}
void SnapshotWindow::keyPressEvent(QKeyEvent *ev)
QModelIndexList si = sm->selectedIndexes();
if (si.isEmpty())
si.append(currentIndex().sibling(currentIndex().row(), 0));
- removeSnapshots(normalizeIndexes(si));
+ foreach (const QModelIndex &idx, normalizeIndexes(si))
+ m_snapshotHandler->removeSnapshot(idx.row());
}
QTreeView::keyPressEvent(ev);
}
QAction *act = menu.exec(ev->globalPos());
if (act == actCreate)
- model()->setData(idx, idx.row(), RequestCreateSnapshotRole);
+ m_snapshotHandler->createSnapshot(idx.row());
else if (act == actRemove)
- model()->setData(idx, idx.row(), RequestRemoveSnapshotRole);
+ m_snapshotHandler->removeSnapshot(idx.row());
else if (act == actAdjust)
resizeColumnsToContents();
else if (act == actAlwaysAdjust)
#include <QtGui/QTreeView>
-QT_BEGIN_NAMESPACE
-class QModelIndex;
-QT_END_NAMESPACE
-
namespace Debugger {
namespace Internal {
+class SnapshotHandler;
+
class SnapshotWindow : public QTreeView
{
Q_OBJECT
public:
- SnapshotWindow(QWidget *parent = 0);
- ~SnapshotWindow();
+ explicit SnapshotWindow(SnapshotHandler *handler);
public slots:
void resizeColumnsToContents();
private:
void keyPressEvent(QKeyEvent *ev);
void contextMenuEvent(QContextMenuEvent *ev);
- void removeSnapshots(const QModelIndexList &list);
bool m_alwaysResizeColumnsToContents;
+ SnapshotHandler *m_snapshotHandler;
};
} // namespace Internal
#include "sourcefileshandler.h"
-#include "debuggerconstants.h"
-#include "debuggerengine.h"
-
#include <QtCore/QDebug>
#include <QtCore/QFileInfo>
namespace Debugger {
namespace Internal {
-SourceFilesHandler::SourceFilesHandler(DebuggerEngine *engine)
- : m_engine(engine)
+SourceFilesHandler::SourceFilesHandler()
{
QSortFilterProxyModel *proxy = new QSortFilterProxyModel(this);
proxy->setSourceModel(this);
QVariant SourceFilesHandler::data(const QModelIndex &index, int role) const
{
- switch (role) {
- case EngineActionsEnabledRole:
- return m_engine->debuggerActionsEnabled();
- }
-
int row = index.row();
if (row < 0 || row >= m_shortNames.size())
return QVariant();
return QVariant();
}
-bool SourceFilesHandler::setData
- (const QModelIndex &index, const QVariant &value, int role)
-{
- Q_UNUSED(index);
- switch (role) {
- case RequestReloadSourceFilesRole:
- m_engine->reloadSourceFiles();
- return true;
-
- case RequestOpenFileRole:
- m_engine->openFile(value.toString());
- return true;
- }
- return false;
-}
-
void SourceFilesHandler::setSourceFiles(const QMap<QString, QString> &sourceFiles)
{
m_shortNames.clear();
#include <QtCore/QStringList>
namespace Debugger {
-class DebuggerEngine;
-
namespace Internal {
class SourceFilesHandler : public QAbstractItemModel
Q_OBJECT
public:
- explicit SourceFilesHandler(DebuggerEngine *engine);
+ SourceFilesHandler();
int columnCount(const QModelIndex &parent) const
{ return parent.isValid() ? 0 : 2; }
{ return createIndex(row, column); }
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
QVariant data(const QModelIndex &index, int role) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role);
Qt::ItemFlags flags(const QModelIndex &index) const;
void clearModel();
QAbstractItemModel *model() { return m_proxyModel; }
private:
- DebuggerEngine *m_engine;
QStringList m_shortNames;
QStringList m_fullNames;
QAbstractItemModel *m_proxyModel;
#include "debuggeractions.h"
#include "debuggerconstants.h"
+#include "debuggerengine.h"
+#include "debuggerplugin.h"
#include <utils/qtcassert.h>
#include <utils/savedaction.h>
#include <QtGui/QMenu>
#include <QtGui/QResizeEvent>
+
//////////////////////////////////////////////////////////////////
//
// SourceFilesWindow
namespace Debugger {
namespace Internal {
+static DebuggerEngine *currentEngine()
+{
+ return DebuggerPlugin::instance()->currentEngine();
+}
+
SourceFilesWindow::SourceFilesWindow(QWidget *parent)
: QTreeView(parent)
{
//header()->setDefaultAlignment(Qt::AlignLeft);
connect(this, SIGNAL(activated(QModelIndex)),
- this, SLOT(sourceFileActivated(QModelIndex)));
+ SLOT(sourceFileActivated(QModelIndex)));
connect(act, SIGNAL(toggled(bool)),
- this, SLOT(setAlternatingRowColorsHelper(bool)));
+ SLOT(setAlternatingRowColorsHelper(bool)));
}
void SourceFilesWindow::sourceFileActivated(const QModelIndex &index)
{
- setModelData(RequestOpenFileRole, index.data());
+ currentEngine()->openFile(index.data().toString());
}
void SourceFilesWindow::contextMenuEvent(QContextMenuEvent *ev)
QModelIndex index = indexAt(ev->pos());
index = index.sibling(index.row(), 0);
QString name = index.data().toString();
- bool engineActionsEnabled = index.data(EngineActionsEnabledRole).toBool();
+ bool engineActionsEnabled = currentEngine()->debuggerActionsEnabled();
QMenu menu;
QAction *act1 = new QAction(tr("Reload Data"), &menu);
QAction *act = menu.exec(ev->globalPos());
if (act == act1)
- setModelData(RequestReloadSourceFilesRole);
+ currentEngine()->reloadSourceFiles();
else if (act == act2)
- setModelData(RequestOpenFileRole, name);
+ currentEngine()->openFile(name);
}
void SourceFilesWindow::setModelData
//
////////////////////////////////////////////////////////////////////////
-StackHandler::StackHandler(DebuggerEngine *engine)
+StackHandler::StackHandler()
: m_positionIcon(QIcon(QLatin1String(":/debugger/images/location_16.png"))),
m_emptyIcon(QIcon(QLatin1String(":/debugger/images/debugger_empty_14.png")))
{
- m_engine = engine;
- m_disassemblerViewAgent = new DisassemblerViewAgent(engine);
m_currentIndex = 0;
m_canExpand = false;
connect(theDebuggerAction(OperateByInstruction), SIGNAL(triggered()),
StackHandler::~StackHandler()
{
- delete m_disassemblerViewAgent;
}
int StackHandler::rowCount(const QModelIndex &parent) const
QVariant StackHandler::data(const QModelIndex &index, int role) const
{
- switch (role) {
- case EngineStateRole:
- return m_engine->state();
-
- case EngineCapabilitiesRole:
- return m_engine->debuggerCapabilities();
-
- case EngineActionsEnabledRole:
- return m_engine->debuggerActionsEnabled();
- }
-
if (!index.isValid() || index.row() >= m_stackFrames.size() + m_canExpand)
return QVariant();
return (index.row() == m_currentIndex) ? m_positionIcon : m_emptyIcon;
}
- if (role == StackFrameAddressRole)
- return frame.address;
-
if (role == Qt::ToolTipRole)
return frame.toToolTip();
}
-bool StackHandler::setData(const QModelIndex &index, const QVariant &value, int role)
-{
- switch (role) {
- case RequestReloadFullStackRole:
- case RequestActivateFrameRole:
- m_engine->handleCommand(role, value);
- return true;
-
- case RequestShowMemoryRole:
- (void) new MemoryViewAgent(m_engine, value.toString());
- return true;
-
- case RequestShowDisassemblerRole: {
- const StackFrame &frame = m_stackFrames.at(value.toInt());
- m_disassemblerViewAgent->setFrame(frame);
- return true;
- }
-
- default:
- return QAbstractTableModel::setData(index, value, role);
- }
-}
-
QVariant StackHandler::headerData(int section, Qt::Orientation orient, int role) const
{
if (orient == Qt::Horizontal && role == Qt::DisplayRole) {
return false;
}
-
} // namespace Internal
} // namespace Debugger
#include <QtCore/QAbstractItemModel>
namespace Debugger {
-class DebuggerEngine;
-
namespace Internal {
-class DisassemblerViewAgent;
-
////////////////////////////////////////////////////////////////////////
//
-// StackModel
+// StackCookie
//
////////////////////////////////////////////////////////////////////////
Q_OBJECT
public:
- explicit StackHandler(DebuggerEngine *engine);
+ StackHandler();
~StackHandler();
void setFrames(const StackFrames &frames, bool canExpand = false);
void setCurrentIndex(int index);
int currentIndex() const { return m_currentIndex; }
StackFrame currentFrame() const;
+ const StackFrame &frameAt(int index) const { return m_stackFrames.at(index); }
int stackSize() const { return m_stackFrames.size(); }
quint64 topAddress() const { return m_stackFrames.at(0).address; }
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
- bool setData(const QModelIndex &index, const QVariant &, int role);
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
Q_SLOT void resetModel() { reset(); }
- DebuggerEngine *m_engine;
- DisassemblerViewAgent *m_disassemblerViewAgent;
StackFrames m_stackFrames;
int m_currentIndex;
const QVariant m_positionIcon;
**************************************************************************/
#include "stackwindow.h"
-#include "stackframe.h"
+#include "stackhandler.h"
#include "debuggeractions.h"
+#include "debuggeragents.h"
#include "debuggerconstants.h"
+#include "debuggerengine.h"
+#include "debuggerplugin.h"
#include <utils/qtcassert.h>
#include <utils/savedaction.h>
namespace Debugger {
namespace Internal {
+static DebuggerEngine *currentEngine()
+{
+ return DebuggerPlugin::instance()->currentEngine();
+}
+
StackWindow::StackWindow(QWidget *parent)
: QTreeView(parent), m_alwaysResizeColumnsToContents(false)
{
header()->resizeSection(3, 60);
connect(this, SIGNAL(activated(QModelIndex)),
- this, SLOT(rowActivated(QModelIndex)));
+ SLOT(rowActivated(QModelIndex)));
connect(act, SIGNAL(toggled(bool)),
- this, SLOT(setAlternatingRowColorsHelper(bool)));
+ SLOT(setAlternatingRowColorsHelper(bool)));
connect(theDebuggerAction(UseAddressInStackView), SIGNAL(toggled(bool)),
- this, SLOT(showAddressColumn(bool)));
+ SLOT(showAddressColumn(bool)));
connect(theDebuggerAction(ExpandStack), SIGNAL(triggered()),
- this, SLOT(reloadFullStack()));
+ SLOT(reloadFullStack()));
connect(theDebuggerAction(MaximalStackDepth), SIGNAL(triggered()),
- this, SLOT(reloadFullStack()));
-}
-
-StackWindow::~StackWindow()
-{
+ SLOT(reloadFullStack()));
}
void StackWindow::showAddressColumn(bool on)
void StackWindow::rowActivated(const QModelIndex &index)
{
- setModelData(RequestActivateFrameRole, index.row());
+ currentEngine()->activateFrame(index.row());
}
void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
{
+ DebuggerEngine *engine = currentEngine();
+ StackHandler *handler = engine->stackHandler();
const QModelIndex index = indexAt(ev->pos());
- const quint64 address = modelData(StackFrameAddressRole, index).toULongLong();
- const unsigned engineCapabilities = modelData(EngineCapabilitiesRole).toUInt();
+ const int row = index.row();
+ const unsigned engineCapabilities = engine->debuggerCapabilities();
+ StackFrame frame;
+ if (row < handler->stackSize())
+ frame = handler->frameAt(row);
+ const quint64 address = frame.address;
QMenu menu;
menu.addAction(theDebuggerAction(ExpandStack));
else if (act == actAlwaysAdjust)
setAlwaysResizeColumnsToContents(!m_alwaysResizeColumnsToContents);
else if (act == actShowMemory)
- setModelData(RequestShowMemoryRole, address);
- else if (act == actShowDisassembler)
- setModelData(RequestShowDisassemblerRole, index.row());
+ (void) new MemoryViewAgent(currentEngine(), address);
+ else if (act == actShowDisassembler) {
+ DisassemblerViewAgent *agent = new DisassemblerViewAgent(engine);
+ agent->setFrame(frame);
+ }
}
void StackWindow::copyContentsToClipboard()
void StackWindow::reloadFullStack()
{
- setModelData(RequestReloadFullStackRole);
+ currentEngine()->reloadFullStack();
}
void StackWindow::resizeColumnsToContents()
header()->setResizeMode(i, mode);
}
-void StackWindow::setModelData
- (int role, const QVariant &value, const QModelIndex &index)
-{
- QTC_ASSERT(model(), return);
- model()->setData(index, value, role);
-}
-
-QVariant StackWindow::modelData(int role, const QModelIndex &index)
-{
- QTC_ASSERT(model(), return QVariant());
- return model()->data(index, role);
-}
-
-
} // namespace Internal
} // namespace Debugger
public:
explicit StackWindow(QWidget *parent = 0);
- ~StackWindow();
public slots:
void resizeColumnsToContents();
void contextMenuEvent(QContextMenuEvent *ev);
void copyContentsToClipboard();
- void setModelData(int role, const QVariant &value = QVariant(),
- const QModelIndex &index = QModelIndex());
- QVariant modelData(int role, const QModelIndex &index = QModelIndex());
-
bool m_alwaysResizeColumnsToContents;
};
#include "watchhandler.h"
#include "breakhandler.h"
-#include "breakpoint.h"
#include "debuggeractions.h"
#include "debuggeragents.h"
#include "debuggerengine.h"
bool WatchModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
- switch (role) {
- case RequestShowInEditorRole: {
- m_handler->showInEditor();
- return true;
- }
-
- case RequestToggleWatchRole: {
- BreakHandler *handler = engine()->breakHandler();
- const quint64 address = value.toULongLong();
- const int index = handler->findWatchPointIndexByAddress(address);
- if (index == -1) {
- BreakpointData *data = new BreakpointData;
- data->type = Watchpoint;
- data->address = address;
- handler->appendBreakpoint(data);
- } else {
- handler->removeBreakpoint(index);
- }
- engine()->attemptBreakpointSynchronization();
- return true;
- }
-
- case RequestShowMemoryRole: {
- (void) new MemoryViewAgent(engine(), value.toULongLong());
- return true;
- }
-
- case RequestClearCppCodeModelSnapshotRole: {
- plugin()->clearCppCodeModelSnapshot();
- return true;
- }
-
- case RequestWatchPointRole: {
- engine()->watchPoint(value.toPoint());
- return true;
- }
- }
-
WatchItem &data = *watchItem(index);
switch (role) {
engine()->updateWatchData(data);
break;
}
-
- case RequestRemoveWatchExpressionRole:
- m_handler->removeWatchExpression(value.toString());
- break;
-
- case RequestWatchExpressionRole:
- m_handler->watchExpression(value.toString());
- break;
}
emit dataChanged(index, index);
m_reportedTypeFormats.insert(type, formats);
}
-void WatchHandler::showInEditor()
+QString WatchHandler::editorContents()
{
QString contents;
showInEditorHelper(&contents, m_locals->m_root, 0);
showInEditorHelper(&contents, m_watchers->m_root, 0);
- plugin()->openTextEditor(tr("Locals & Watchers"), contents);
+ return contents;
}
void WatchHandler::showInEditorHelper(QString *contents, WatchItem *item, int depth)
QByteArray watcherName(const QByteArray &exp);
void synchronizeWatchers();
+ QString editorContents();
private:
friend class WatchModel;
void setFormat(const QByteArray &type, int format);
void updateWatchersWindow();
- void showInEditor();
void showInEditorHelper(QString *contents, WatchItem *item, int level);
bool m_inChange;
#include "watchwindow.h"
+#include "breakhandler.h"
+#include "debuggeragents.h"
#include "debuggeractions.h"
#include "debuggerconstants.h"
-#include "debuggerengine.h"
#include "debuggerdialogs.h"
-#include "watchhandler.h"
+#include "debuggerengine.h"
+#include "debuggerplugin.h"
#include "watchdelegatewidgets.h"
+#include "watchhandler.h"
#include <utils/qtcassert.h>
#include <utils/savedaction.h>
#include <QtCore/QDebug>
-#include <QtCore/QVariant>
-#include <QtCore/QMetaProperty>
#include <QtCore/QMetaObject>
+#include <QtCore/QMetaProperty>
+#include <QtCore/QVariant>
#include <QtGui/QContextMenuEvent>
#include <QtGui/QHeaderView>
#include <QtGui/QMenu>
#include <QtGui/QResizeEvent>
-using namespace Debugger;
-using namespace Debugger::Internal;
/////////////////////////////////////////////////////////////////////
//
//
/////////////////////////////////////////////////////////////////////
+namespace Debugger {
+namespace Internal {
+
+static DebuggerPlugin *plugin()
+{
+ return DebuggerPlugin::instance();
+}
+
+static DebuggerEngine *currentEngine()
+{
+ return DebuggerPlugin::instance()->currentEngine();
+}
+
class WatchDelegate : public QItemDelegate
{
public:
- explicit WatchDelegate(QObject *parent) : QItemDelegate(parent) {}
+ explicit WatchDelegate(WatchWindow *parent)
+ : QItemDelegate(parent), m_watchWindow(parent)
+ {}
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &,
const QModelIndex &index) const
}
const QMetaProperty userProperty = editor->metaObject()->userProperty();
QTC_ASSERT(userProperty.isValid(), return);
- const QVariant value = editor->property(userProperty.name());
+ const QString value = editor->property(userProperty.name()).toString();
const QString exp = index.data(LocalsExpressionRole).toString();
- if (exp != value.toString()) {
- model->setData(index, exp, RequestRemoveWatchExpressionRole);
- model->setData(index, value, RequestWatchExpressionRole);
- }
+ if (exp == value)
+ return;
+ m_watchWindow->removeWatchExpression(exp);
+ m_watchWindow->watchExpression(value);
}
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option,
{
editor->setGeometry(option.rect);
}
+
+private:
+ WatchWindow *m_watchWindow;
};
/////////////////////////////////////////////////////////////////////
void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
{
+ DebuggerEngine *engine = currentEngine();
+ WatchHandler *handler = engine->watchHandler();
+
const QModelIndex idx = indexAt(ev->pos());
const QModelIndex mi0 = idx.sibling(idx.row(), 0);
const QModelIndex mi1 = idx.sibling(idx.row(), 1);
} else if (act == actInsertNewWatchItem) {
watchExpression(QString());
} else if (act == actOpenMemoryEditAtVariableAddress) {
- setModelData(RequestShowMemoryRole, address);
+ (void) new MemoryViewAgent(currentEngine(), address);
} else if (act == actOpenMemoryEditAtPointerValue) {
- setModelData(RequestShowMemoryRole, pointerValue);
+ (void) new MemoryViewAgent(currentEngine(), pointerValue);
} else if (act == actOpenMemoryEditor) {
AddressDialog dialog;
if (dialog.exec() == QDialog::Accepted)
- setModelData(RequestShowMemoryRole, dialog.address());
+ (void) new MemoryViewAgent(currentEngine(), dialog.address());
} else if (act == actSetWatchPointAtVariableAddress) {
- setModelData(RequestToggleWatchRole, address);
+ setWatchpoint(address);
} else if (act == actSetWatchPointAtPointerValue) {
- setModelData(RequestToggleWatchRole, pointerValue);
+ setWatchpoint(pointerValue);
} else if (act == actSelectWidgetToWatch) {
grabMouse(Qt::CrossCursor);
m_grabbing = true;
} else if (act == actRemoveWatchExpression) {
removeWatchExpression(exp);
} else if (act == actClearCodeModelSnapshot) {
- setModelData(RequestClearCppCodeModelSnapshotRole);
+ plugin()->clearCppCodeModelSnapshot();
} else if (act == clearTypeFormatAction) {
setModelData(LocalsTypeFormatRole, -1, mi1);
} else if (act == clearIndividualFormatAction) {
setModelData(LocalsIndividualFormatRole, -1, mi1);
} else if (act == actShowInEditor) {
- setModelData(RequestShowInEditorRole);
+ QString contents = handler->editorContents();
+ plugin()->openTextEditor(tr("Locals & Watchers"), contents);
} else {
for (int i = 0; i != typeFormatActions.size(); ++i) {
if (act == typeFormatActions.at(i))
QMouseEvent *mev = static_cast<QMouseEvent *>(ev);
m_grabbing = false;
releaseMouse();
- setModelData(RequestWatchPointRole, mapToGlobal(mev->pos()));
+ currentEngine()->watchPoint(mapToGlobal(mev->pos()));
}
return QTreeView::event(ev);
}
if (m_type != LocalsType)
header()->hide();
- connect(model, SIGNAL(layoutChanged()),
- this, SLOT(resetHelper()));
- connect(model, SIGNAL(enableUpdates(bool)),
- this, SLOT(setUpdatesEnabled(bool)));
+ connect(model, SIGNAL(layoutChanged()), SLOT(resetHelper()));
+ connect(model, SIGNAL(enableUpdates(bool)), SLOT(setUpdatesEnabled(bool)));
}
void WatchWindow::setUpdatesEnabled(bool enable)
void WatchWindow::watchExpression(const QString &exp)
{
- setModelData(RequestWatchExpressionRole, exp);
+ currentEngine()->watchHandler()->watchExpression(exp);
}
void WatchWindow::removeWatchExpression(const QString &exp)
{
- setModelData(RequestRemoveWatchExpressionRole, exp);
+ currentEngine()->watchHandler()->removeWatchExpression(exp);
}
void WatchWindow::setModelData
return model()->data(index, role);
}
+void WatchWindow::setWatchpoint(quint64 address)
+{
+ DebuggerEngine *engine = currentEngine();
+ BreakHandler *handler = engine->breakHandler();
+ const int index = handler->findWatchPointIndexByAddress(address);
+ if (index == -1) {
+ BreakpointData *data = new BreakpointData;
+ data->type = Watchpoint;
+ data->address = address;
+ handler->appendBreakpoint(data);
+ } else {
+ handler->removeBreakpoint(index);
+ }
+ engine->attemptBreakpointSynchronization();
+}
+
+} // namespace Internal
+} // namespace Debugger
+
void setAlwaysResizeColumnsToContents(bool on = true);
void setModel(QAbstractItemModel *model);
void setAlternatingRowColorsHelper(bool on) { setAlternatingRowColors(on); }
+ void watchExpression(const QString &exp);
+ void removeWatchExpression(const QString &exp);
private:
Q_SLOT void resetHelper();
void editItem(const QModelIndex &idx);
void resetHelper(const QModelIndex &idx);
- void watchExpression(const QString &exp);
- void removeWatchExpression(const QString &exp);
+ void setWatchpoint(quint64 address);
void setModelData(int role, const QVariant &value = QVariant(),
const QModelIndex &index = QModelIndex());