HomePhabricator

[LLDB] [Windows] Fix Windows-specific race condition in LLDB for session…

Authored by mstorsjo on Oct 28 2019, 1:28 AM.

Description

[LLDB] [Windows] Fix Windows-specific race condition in LLDB for session lifetime

This can e.g. happen if the debugged executable exits before the initial
stop, e.g. if it fails to load dependent DLLs.

Add a virtual destructor to ProcessDebugger and let it clean up the
session, and make ProcessWindows::OnExitProcess call
ProcessDebugger::OnExitProcess for shared parts.

Fix suggestion by Adrian McCarthy.

Differential Revision: https://reviews.llvm.org/D69503