forked from qt-creator/qt-creator
debugger: fix vanishing location mark in disassembler mode
Task-number: QTCREATORBUG-4157
This commit is contained in:
@@ -246,6 +246,7 @@ public slots:
|
|||||||
void scheduleResetLocation()
|
void scheduleResetLocation()
|
||||||
{
|
{
|
||||||
m_stackHandler.scheduleResetLocation();
|
m_stackHandler.scheduleResetLocation();
|
||||||
|
m_disassemblerAgent.scheduleResetLocation();
|
||||||
m_locationTimer.setSingleShot(true);
|
m_locationTimer.setSingleShot(true);
|
||||||
m_locationTimer.start(80);
|
m_locationTimer.start(80);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,13 +117,15 @@ public:
|
|||||||
|
|
||||||
QHash<QString, DisassemblerLines> cache;
|
QHash<QString, DisassemblerLines> cache;
|
||||||
QString mimeType;
|
QString mimeType;
|
||||||
|
bool m_resetLocationScheduled;
|
||||||
};
|
};
|
||||||
|
|
||||||
DisassemblerAgentPrivate::DisassemblerAgentPrivate()
|
DisassemblerAgentPrivate::DisassemblerAgentPrivate()
|
||||||
: editor(0),
|
: editor(0),
|
||||||
tryMixed(true),
|
tryMixed(true),
|
||||||
locationMark(new LocationMark2),
|
locationMark(new LocationMark2),
|
||||||
mimeType(_("text/x-qtcreator-generic-asm"))
|
mimeType(_("text/x-qtcreator-generic-asm")),
|
||||||
|
m_resetLocationScheduled(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,12 +164,20 @@ void DisassemblerAgent::cleanup()
|
|||||||
d->cache.clear();
|
d->cache.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DisassemblerAgent::scheduleResetLocation()
|
||||||
|
{
|
||||||
|
d->m_resetLocationScheduled = true;
|
||||||
|
}
|
||||||
|
|
||||||
void DisassemblerAgent::resetLocation()
|
void DisassemblerAgent::resetLocation()
|
||||||
{
|
{
|
||||||
if (!d->editor)
|
if (!d->editor)
|
||||||
return;
|
return;
|
||||||
|
if (d->m_resetLocationScheduled) {
|
||||||
|
d->m_resetLocationScheduled = false;
|
||||||
d->editor->markableInterface()->removeMark(d->locationMark);
|
d->editor->markableInterface()->removeMark(d->locationMark);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static QString frameKey(const Location &loc)
|
static QString frameKey(const Location &loc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ public:
|
|||||||
void setTryMixed(bool on);
|
void setTryMixed(bool on);
|
||||||
void setLocation(const Location &location);
|
void setLocation(const Location &location);
|
||||||
const Location &location() const;
|
const Location &location() const;
|
||||||
|
void scheduleResetLocation();
|
||||||
void resetLocation();
|
void resetLocation();
|
||||||
void setContents(const DisassemblerLines &contents);
|
void setContents(const DisassemblerLines &contents);
|
||||||
void updateLocationMarker();
|
void updateLocationMarker();
|
||||||
|
|||||||
Reference in New Issue
Block a user