[Lldb-commits] [lldb] r156879 - in /lldb/trunk: include/lldb/Core/Debugger.h source/Core/Debugger.cpp
Greg Clayton
gclayton at apple.com
Tue May 15 17:11:54 PDT 2012
Author: gclayton
Date: Tue May 15 19:11:54 2012
New Revision: 156879
URL: http://llvm.org/viewvc/llvm-project?rev=156879&view=rev
Log:
<rdar://problem/11246147>
Make sure our debugger STDIN read thread shuts down quickly when we are done with it. We had a case where the owner of the file handle was not closing it and caused spins.
Modified:
lldb/trunk/include/lldb/Core/Debugger.h
lldb/trunk/source/Core/Debugger.cpp
Modified: lldb/trunk/include/lldb/Core/Debugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Debugger.h?rev=156879&r1=156878&r2=156879&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Debugger.h (original)
+++ lldb/trunk/include/lldb/Core/Debugger.h Tue May 15 19:11:54 2012
@@ -506,12 +506,6 @@
bool
CheckIfTopInputReaderIsDone ();
- void
- DisconnectInput()
- {
- m_input_comm.Clear ();
- }
-
SourceManager::SourceFileCache &
GetSourceFileCache ()
{
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=156879&r1=156878&r2=156879&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Tue May 15 19:11:54 2012
@@ -387,8 +387,14 @@
}
}
BroadcasterManager::Clear ();
- DisconnectInput();
-
+
+ // Close the input file _before_ we close the input read communications class
+ // as it does NOT own the input file, our m_input_file does.
+ GetInputFile().Close ();
+ // Now that we have closed m_input_file, we can now tell our input communication
+ // class to close down. Its read thread should quickly exit after we close
+ // the input file handle above.
+ m_input_comm.Clear ();
}
bool
More information about the lldb-commits
mailing list