diff --git a/mesosphere/include/mesosphere/processes/KProcess.hpp b/mesosphere/include/mesosphere/processes/KProcess.hpp index 58f164117..13cd14bca 100644 --- a/mesosphere/include/mesosphere/processes/KProcess.hpp +++ b/mesosphere/include/mesosphere/processes/KProcess.hpp @@ -39,6 +39,8 @@ class KProcess final : public KSynchronizationObject /* FIXME */ { constexpr State GetState() const { return state; } + void SetDebugPauseState(bool pause); + KDebug *GetDebug() const { return debug; } void SetDebug(KDebug *debug); void ClearDebug(State attachState); diff --git a/mesosphere/source/processes/KProcess.cpp b/mesosphere/source/processes/KProcess.cpp index 35fe15698..eef69396d 100644 --- a/mesosphere/source/processes/KProcess.cpp +++ b/mesosphere/source/processes/KProcess.cpp @@ -42,4 +42,17 @@ void KProcess::ClearDebug(KProcess::State attachState) } } +void KProcess::SetDebugPauseState(bool pause) { + if (pause && state == State::StartedAttached) { + state = State::DebugSuspended; + } else if (!pause && state == State::DebugSuspended) { + state = State::StartedAttached; + } else { + return; + } + + stateChanged = true; + NotifyWaiters(); +} + }