forked from qt-creator/qt-creator
debugger: make memory view updatable
Still some flickering and no marks which parts changed.
This commit is contained in:
@@ -520,14 +520,17 @@ void DebuggerEngine::gotoLocation(const QString &file, int line, bool setMarker)
|
|||||||
|
|
||||||
d->doRemoveLocationMark();
|
d->doRemoveLocationMark();
|
||||||
|
|
||||||
bool newEditor = false;
|
EditorManager *editorManager = EditorManager::instance();
|
||||||
ITextEditor *editor =
|
QList<IEditor *> editors = editorManager->editorsForFileName(file);
|
||||||
BaseTextEditor::openEditorAt(file, line, 0, QString(),
|
if (editors.isEmpty()) {
|
||||||
EditorManager::IgnoreNavigationHistory, &newEditor);
|
editors.append(editorManager->openEditor(file, QString(),
|
||||||
if (!editor)
|
EditorManager::IgnoreNavigationHistory));
|
||||||
return;
|
editors.back()->setProperty(Constants::OPENED_BY_DEBUGGER, true);
|
||||||
if (newEditor)
|
}
|
||||||
editor->setProperty(Constants::OPENED_BY_DEBUGGER, true);
|
ITextEditor *texteditor = qobject_cast<ITextEditor *>(editors.back());
|
||||||
|
if (texteditor)
|
||||||
|
texteditor->gotoLine(line, 0);
|
||||||
|
|
||||||
if (setMarker)
|
if (setMarker)
|
||||||
d->m_locationMark.reset(new LocationMark(file, line));
|
d->m_locationMark.reset(new LocationMark(file, line));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ void MemoryAgent::createBinEditor(quint64 addr)
|
|||||||
IEditor *editor = editorManager->openEditorWithContents(
|
IEditor *editor = editorManager->openEditorWithContents(
|
||||||
Core::Constants::K_DEFAULT_BINARY_EDITOR_ID,
|
Core::Constants::K_DEFAULT_BINARY_EDITOR_ID,
|
||||||
&titlePattern);
|
&titlePattern);
|
||||||
|
editorManager->activateEditor(editor);
|
||||||
if (editor) {
|
if (editor) {
|
||||||
editor->setProperty(Debugger::Constants::OPENED_BY_DEBUGGER, true);
|
editor->setProperty(Debugger::Constants::OPENED_BY_DEBUGGER, true);
|
||||||
editor->setProperty(Debugger::Constants::OPENED_WITH_MEMORY, true);
|
editor->setProperty(Debugger::Constants::OPENED_WITH_MEMORY, true);
|
||||||
@@ -126,7 +127,6 @@ void MemoryAgent::addLazyData(QObject *editorToken, quint64 addr,
|
|||||||
{
|
{
|
||||||
IEditor *editor = qobject_cast<IEditor *>(editorToken);
|
IEditor *editor = qobject_cast<IEditor *>(editorToken);
|
||||||
if (editor && editor->widget()) {
|
if (editor && editor->widget()) {
|
||||||
Core::EditorManager::instance()->activateEditor(editor);
|
|
||||||
QMetaObject::invokeMethod(editor->widget(), "addLazyData",
|
QMetaObject::invokeMethod(editor->widget(), "addLazyData",
|
||||||
Q_ARG(quint64, addr / BinBlockSize), Q_ARG(QByteArray, ba));
|
Q_ARG(quint64, addr / BinBlockSize), Q_ARG(QByteArray, ba));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user