fix saving settings when debugging

This commit is contained in:
mandlebro 2018-06-15 18:33:17 +01:00 committed by xarkes
parent cd1656fc30
commit 2bfa3b7a3f
2 changed files with 9 additions and 2 deletions

View File

@ -759,10 +759,15 @@ void CutterCore::setRegister(QString regName, QString regValue)
void CutterCore::startDebug() void CutterCore::startDebug()
{ {
offsetPriorDebugging = getOffset(); if (!currentlyDebugging) {
offsetPriorDebugging = getOffset();
}
cmd("ood"); cmd("ood");
emit registersChanged(); emit registersChanged();
emit changeDebugView(); if (!currentlyDebugging) {
emit changeDebugView();
currentlyDebugging = true;
}
} }
void CutterCore::stopDebug() void CutterCore::stopDebug()
@ -772,6 +777,7 @@ void CutterCore::stopDebug()
cmd("dk 9; ds; e cfg.debug = false; oo"); cmd("dk 9; ds; e cfg.debug = false; oo");
seek(offsetPriorDebugging); seek(offsetPriorDebugging);
emit changeDefinedView(); emit changeDefinedView();
currentlyDebugging = false;
} }
void CutterCore::continueDebug() void CutterCore::continueDebug()

View File

@ -600,6 +600,7 @@ private:
RVA offsetPriorDebugging = RVA_INVALID; RVA offsetPriorDebugging = RVA_INVALID;
QList<CutterPlugin*> plugins; QList<CutterPlugin*> plugins;
bool currentlyDebugging = false;
}; };
class ccClass : public CutterCore class ccClass : public CutterCore