Debugger: Handle terminations occurring during WaitForThreadOrUser.

Otherwise we enter an infinite loop.
This commit is contained in:
Augustin Cavalier
2025-11-13 15:22:22 -05:00
parent 5e0c933df0
commit 78e1c0f063
@@ -388,8 +388,11 @@ CliContext::WaitForThreadOrUser()
AutoLocker<BLocker> locker(fLock);
while (fStoppedThread == NULL)
while (fStoppedThread == NULL) {
_WaitForEvent(MSG_THREAD_STATE_CHANGED);
if (fTerminating)
break;
}
if (fCurrentThread == NULL)
SetCurrentThread(fStoppedThread);
@@ -397,7 +400,8 @@ CliContext::WaitForThreadOrUser()
void
CliContext::WaitForEvent(uint32 event) {
CliContext::WaitForEvent(uint32 event)
{
AutoLocker<BLocker> locker(fLock);
_WaitForEvent(event);
}