diff --git a/src/Cutter.cpp b/src/Cutter.cpp index 344d7d06..2a0b9f16 100644 --- a/src/Cutter.cpp +++ b/src/Cutter.cpp @@ -759,10 +759,15 @@ void CutterCore::setRegister(QString regName, QString regValue) void CutterCore::startDebug() { - offsetPriorDebugging = getOffset(); + if (!currentlyDebugging) { + offsetPriorDebugging = getOffset(); + } cmd("ood"); emit registersChanged(); - emit changeDebugView(); + if (!currentlyDebugging) { + emit changeDebugView(); + currentlyDebugging = true; + } } void CutterCore::stopDebug() @@ -772,6 +777,7 @@ void CutterCore::stopDebug() cmd("dk 9; ds; e cfg.debug = false; oo"); seek(offsetPriorDebugging); emit changeDefinedView(); + currentlyDebugging = false; } void CutterCore::continueDebug() diff --git a/src/Cutter.h b/src/Cutter.h index 8704cc57..30e15ee5 100644 --- a/src/Cutter.h +++ b/src/Cutter.h @@ -600,6 +600,7 @@ private: RVA offsetPriorDebugging = RVA_INVALID; QList plugins; + bool currentlyDebugging = false; }; class ccClass : public CutterCore