meso: add KProcess::SetDebugPauseState

This commit is contained in:
TuxSH authored and Michael Scire committed 2019-06-03 17:41:09 -07:00
1 parent 529024448e
commit 91662decf0
2 files changed
+15

No files matched your search

@@ -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);
+13
View File
@@ -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();
}
}