debugger: add watchpoint option to memoryview context menu

Change-Id: I9511e15afcfe4664ae5077dd568e5a3637888e30
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-06-03 23:05:58 +02:00
parent 48fcfe0b8d
commit 0af2934e48
4 changed files with 44 additions and 21 deletions

View File

@@ -33,6 +33,7 @@
#include "memoryagent.h"
#include "memoryview.h"
#include "breakhandler.h"
#include "debuggerengine.h"
#include "debuggerstartparameters.h"
#include "debuggercore.h"
@@ -152,6 +153,12 @@ void MemoryAgent::connectBinEditorWidget(QWidget *w)
connect(w,
SIGNAL(dataChanged(Core::IEditor*,quint64,QByteArray)),
SLOT(handleDataChanged(Core::IEditor*,quint64,QByteArray)));
connect(w,
SIGNAL(dataChanged(Core::IEditor*,quint64,QByteArray)),
SLOT(handleDataChanged(Core::IEditor*,quint64,QByteArray)));
connect(w,
SIGNAL(addWatchpointRequested(quint64, uint)),
SLOT(handleWatchpointRequest(quint64, uint)));
}
bool MemoryAgent::doCreateBinEditor(quint64 addr, unsigned flags,
@@ -270,6 +277,11 @@ void MemoryAgent::handleDataChanged(IEditor *,
m_engine->changeMemory(this, sender(), addr, data);
}
void MemoryAgent::handleWatchpointRequest(quint64 address, uint size)
{
m_engine->breakHandler()->setWatchpointAtAddress(address, size);
}
void MemoryAgent::updateContents()
{
foreach (const QPointer<Core::IEditor> &e, m_editors)