@@ -32,11 +32,6 @@ namespace lldb_private {
3232class Debugger ;
3333} // namespace lldb_private
3434
35- namespace curses {
36- class Application ;
37- typedef std::unique_ptr<Application> ApplicationAP;
38- } // namespace curses
39-
4035namespace lldb_private {
4136
4237class IOHandler {
@@ -58,8 +53,9 @@ class IOHandler {
5853 IOHandler (Debugger &debugger, IOHandler::Type type);
5954
6055 IOHandler (Debugger &debugger, IOHandler::Type type,
61- const lldb::FileSP &input_sp, const lldb::StreamFileSP &output_sp,
62- const lldb::StreamFileSP &error_sp, uint32_t flags);
56+ const lldb::FileSP &input_sp,
57+ const lldb::LockableStreamFileSP &output_sp,
58+ const lldb::LockableStreamFileSP &error_sp, uint32_t flags);
6359
6460 virtual ~IOHandler ();
6561
@@ -117,17 +113,11 @@ class IOHandler {
117113
118114 int GetErrorFD ();
119115
120- FILE *GetInputFILE ();
121-
122- FILE *GetOutputFILE ();
123-
124- FILE *GetErrorFILE ();
125-
126116 lldb::FileSP GetInputFileSP ();
127117
128- lldb::StreamFileSP GetOutputStreamFileSP ();
118+ lldb::LockableStreamFileSP GetOutputStreamFileSP ();
129119
130- lldb::StreamFileSP GetErrorStreamFileSP ();
120+ lldb::LockableStreamFileSP GetErrorStreamFileSP ();
131121
132122 Debugger &GetDebugger () { return m_debugger; }
133123
@@ -160,14 +150,11 @@ class IOHandler {
160150
161151 virtual void PrintAsync (const char *s, size_t len, bool is_stdout);
162152
163- std::recursive_mutex &GetOutputMutex () { return m_output_mutex; }
164-
165153protected:
166154 Debugger &m_debugger;
167155 lldb::FileSP m_input_sp;
168- lldb::StreamFileSP m_output_sp;
169- lldb::StreamFileSP m_error_sp;
170- std::recursive_mutex m_output_mutex;
156+ lldb::LockableStreamFileSP m_output_sp;
157+ lldb::LockableStreamFileSP m_error_sp;
171158 Predicate<bool > m_popped;
172159 Flags m_flags;
173160 Type m_type;
@@ -335,8 +322,8 @@ class IOHandlerEditline : public IOHandler {
335322
336323 IOHandlerEditline (Debugger &debugger, IOHandler::Type type,
337324 const lldb::FileSP &input_sp,
338- const lldb::StreamFileSP &output_sp,
339- const lldb::StreamFileSP &error_sp, uint32_t flags,
325+ const lldb::LockableStreamFileSP &output_sp,
326+ const lldb::LockableStreamFileSP &error_sp, uint32_t flags,
340327 const char *editline_name, // Used for saving history files
341328 llvm::StringRef prompt, llvm::StringRef continuation_prompt,
342329 bool multi_line, bool color,
@@ -350,9 +337,10 @@ class IOHandlerEditline : public IOHandler {
350337 IOHandlerDelegate &) = delete ;
351338
352339 IOHandlerEditline (Debugger &, IOHandler::Type, const lldb::FileSP &,
353- const lldb::StreamFileSP &, const lldb::StreamFileSP &,
354- uint32_t , const char *, const char *, const char *, bool ,
355- bool , uint32_t , IOHandlerDelegate &) = delete ;
340+ const lldb::LockableStreamFileSP &,
341+ const lldb::LockableStreamFileSP &, uint32_t , const char *,
342+ const char *, const char *, bool , bool , uint32_t ,
343+ IOHandlerDelegate &) = delete ;
356344
357345 ~IOHandlerEditline () override ;
358346
0 commit comments