@@ -32,6 +32,11 @@ 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+
3540namespace lldb_private {
3641
3742class IOHandler {
@@ -53,9 +58,8 @@ class IOHandler {
5358 IOHandler (Debugger &debugger, IOHandler::Type type);
5459
5560 IOHandler (Debugger &debugger, IOHandler::Type type,
56- const lldb::FileSP &input_sp,
57- const lldb::LockableStreamFileSP &output_sp,
58- const lldb::LockableStreamFileSP &error_sp, uint32_t flags);
61+ const lldb::FileSP &input_sp, const lldb::StreamFileSP &output_sp,
62+ const lldb::StreamFileSP &error_sp, uint32_t flags);
5963
6064 virtual ~IOHandler ();
6165
@@ -113,11 +117,17 @@ class IOHandler {
113117
114118 int GetErrorFD ();
115119
120+ FILE *GetInputFILE ();
121+
122+ FILE *GetOutputFILE ();
123+
124+ FILE *GetErrorFILE ();
125+
116126 lldb::FileSP GetInputFileSP ();
117127
118- lldb::LockableStreamFileSP GetOutputStreamFileSP ();
128+ lldb::StreamFileSP GetOutputStreamFileSP ();
119129
120- lldb::LockableStreamFileSP GetErrorStreamFileSP ();
130+ lldb::StreamFileSP GetErrorStreamFileSP ();
121131
122132 Debugger &GetDebugger () { return m_debugger; }
123133
@@ -150,11 +160,14 @@ class IOHandler {
150160
151161 virtual void PrintAsync (const char *s, size_t len, bool is_stdout);
152162
163+ std::recursive_mutex &GetOutputMutex () { return m_output_mutex; }
164+
153165protected:
154166 Debugger &m_debugger;
155167 lldb::FileSP m_input_sp;
156- lldb::LockableStreamFileSP m_output_sp;
157- lldb::LockableStreamFileSP m_error_sp;
168+ lldb::StreamFileSP m_output_sp;
169+ lldb::StreamFileSP m_error_sp;
170+ std::recursive_mutex m_output_mutex;
158171 Predicate<bool > m_popped;
159172 Flags m_flags;
160173 Type m_type;
@@ -322,8 +335,8 @@ class IOHandlerEditline : public IOHandler {
322335
323336 IOHandlerEditline (Debugger &debugger, IOHandler::Type type,
324337 const lldb::FileSP &input_sp,
325- const lldb::LockableStreamFileSP &output_sp,
326- const lldb::LockableStreamFileSP &error_sp, uint32_t flags,
338+ const lldb::StreamFileSP &output_sp,
339+ const lldb::StreamFileSP &error_sp, uint32_t flags,
327340 const char *editline_name, // Used for saving history files
328341 llvm::StringRef prompt, llvm::StringRef continuation_prompt,
329342 bool multi_line, bool color,
@@ -337,10 +350,9 @@ class IOHandlerEditline : public IOHandler {
337350 IOHandlerDelegate &) = delete ;
338351
339352 IOHandlerEditline (Debugger &, IOHandler::Type, const lldb::FileSP &,
340- const lldb::LockableStreamFileSP &,
341- const lldb::LockableStreamFileSP &, uint32_t , const char *,
342- const char *, const char *, bool , bool , uint32_t ,
343- IOHandlerDelegate &) = delete ;
353+ const lldb::StreamFileSP &, const lldb::StreamFileSP &,
354+ uint32_t , const char *, const char *, const char *, bool ,
355+ bool , uint32_t , IOHandlerDelegate &) = delete ;
344356
345357 ~IOHandlerEditline () override ;
346358
0 commit comments