Fix #9854.
The post syscall debug events used for output capture have an unfortunate side effect: when asked to debug a thread, the thread is interrupted, which, if currently blocked in a syscall will cause it to unblock and send a post syscall event indicating such. However, this will also absorb the debug stop flag that was set by the initial debug request, and so we won't actually get the separate event indicating thread debugged. Consequently, we now set a pending stop request flag on the corresponding Thread object, and check if it's set when processing syscall events. If so, we treat such an event as having triggered a debug stop even though the received event type is not explicitly B_DEBUGGER_MESSAGE_THREAD_DEBUGGED.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2009-2012, Ingo Weinhold, [email protected].
|
||||
* Copyright 2010-2011, Rene Gollent, [email protected].
|
||||
* Copyright 2010-2013, Rene Gollent, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@@ -243,7 +243,8 @@ ThreadHandler::HandleThreadAction(uint32 action, target_addr_t address)
|
||||
return;
|
||||
case MSG_THREAD_STOP:
|
||||
fStepMode = STEP_NONE;
|
||||
fDebuggerInterface->StopThread(ThreadID());
|
||||
if (fDebuggerInterface->StopThread(ThreadID()) == B_OK)
|
||||
fThread->SetStopRequestPending();
|
||||
return;
|
||||
case MSG_THREAD_STEP_OVER:
|
||||
case MSG_THREAD_STEP_INTO:
|
||||
|
||||
Reference in New Issue
Block a user