DBG_C_Stop
Appearance
Debug Command 10 - Stop Command
- Parameters
- Pid= Process ID of debuggee
- Cmd= DBG_C_Stop
- Returns
- The function performed by this command depends on the current state of the debuggee process, as follows:
- If the debuggee is already stopped:
- If there is a pending notification from the current thread, it is returned. See DosDebug Notifications for information about pending notifications.
- If there is no pending notification from the current thread, DBG_N_Success is returned.
- If the debuggee is executing user code:
- The debuggee is marked to stop before the next time it is ready to execute user-space (ring 2 or 3) code. This is known as an asynchronous stop.
- Kernel operations will not be interrupted for this DBG_C_Stop That is, threads blocked in the kernel (via a semaphore or internal operation) will not be interrupted. However, an infinite loop in user space will be stopped.
- Note
- The asynchronous variation of the stop command implies a debugger with a minimum of two threads; one waits for a DBG_C_Go or DBG_C_SStep command to finish, and another executes the DBG_C_Stop command.