diff --git a/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp --- a/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp @@ -154,15 +154,8 @@ return true; TargetThreadWindows &wthread = static_cast(m_thread); - uint8_t buffer[2048]; - memset(buffer, 0, sizeof(buffer)); - PCONTEXT tmpContext = NULL; - DWORD contextLength = (DWORD)sizeof(buffer); - if (!::InitializeContext(buffer, kWinContextFlags, &tmpContext, - &contextLength)) { - return false; - } - memcpy(&m_context, tmpContext, sizeof(m_context)); + memset(&m_context, 0, sizeof(m_context)); + m_context.ContextFlags = kWinContextFlags; if (::SuspendThread( wthread.GetHostThread().GetNativeThread().GetSystemHandle()) == (DWORD)-1) {