[Windows] Fix a bug that causes lldb to freeze
authorAaron Smith <aaron.smith@microsoft.com>
Wed, 10 Oct 2018 18:30:32 +0000 (18:30 +0000)
committerAaron Smith <aaron.smith@microsoft.com>
Wed, 10 Oct 2018 18:30:32 +0000 (18:30 +0000)
commite30379043076ce612b9d576d45015623d8ab8917
treebfaae92aac225b13045a4f3fd37c3c89410c5884
parentfca28db904325441ebb9d98678f06e82caffdcfc
[Windows] Fix a bug that causes lldb to freeze

Summary:
If the process exits before any initial stop then notify the debugger
of the error otherwise WaitForDebuggerConnection() will be blocked.
An example of this issue is when a process fails to load a dependent DLL.

In addition to the fix, remove a duplicate call to FreeProcessHandles() in
DebuggerThread::HandleExitProcessEvent() and use decimal format
for all thread IDs.

Reviewers: rnk, zturner, aleksandr.urakov

Reviewed By: zturner

Subscribers: lldb-commits

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

llvm-svn: 344168
lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp