Changeset View
Changeset View
Standalone View
Standalone View
source/Plugins/Process/Windows/Common/DebuggerThread.cpp
Show First 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | DebuggerThread::HandleExceptionEvent(const EXCEPTION_DEBUG_INFO &info, | ||||
Log *log = | Log *log = | ||||
ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT | WINDOWS_LOG_EXCEPTION); | ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT | WINDOWS_LOG_EXCEPTION); | ||||
if (m_is_shutting_down) { | if (m_is_shutting_down) { | ||||
// A breakpoint that occurs while `m_pid_to_detach` is non-zero is a magic | // A breakpoint that occurs while `m_pid_to_detach` is non-zero is a magic | ||||
// exception that | // exception that | ||||
// we use simply to wake up the DebuggerThread so that we can close out the | // we use simply to wake up the DebuggerThread so that we can close out the | ||||
// debug loop. | // debug loop. | ||||
if (m_pid_to_detach != 0 && | if (m_pid_to_detach != 0 && | ||||
info.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT) { | (info.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT || | ||||
info.ExceptionRecord.ExceptionCode == 0x4000001FL /* WOW64 STATUS_WX86_BREAKPOINT */)) { | |||||
LLDB_LOG(log, "Breakpoint exception is cue to detach from process {0:x}", | LLDB_LOG(log, "Breakpoint exception is cue to detach from process {0:x}", | ||||
m_pid_to_detach.load()); | m_pid_to_detach.load()); | ||||
::DebugActiveProcessStop(m_pid_to_detach); | ::DebugActiveProcessStop(m_pid_to_detach); | ||||
m_detached = true; | m_detached = true; | ||||
} | } | ||||
// Don't perform any blocking operations while we're shutting down. That | // Don't perform any blocking operations while we're shutting down. That | ||||
// will cause TerminateProcess -> WaitForSingleObject to time out. | // will cause TerminateProcess -> WaitForSingleObject to time out. | ||||
▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines |