@@ -32,11 +32,6 @@ namespace lldb_private {
32
32
class Debugger ;
33
33
} // namespace lldb_private
34
34
35
- namespace curses {
36
- class Application ;
37
- typedef std::unique_ptr<Application> ApplicationAP;
38
- } // namespace curses
39
-
40
35
namespace lldb_private {
41
36
42
37
class IOHandler {
@@ -58,8 +53,9 @@ class IOHandler {
58
53
IOHandler (Debugger &debugger, IOHandler::Type type);
59
54
60
55
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);
63
59
64
60
virtual ~IOHandler ();
65
61
@@ -117,17 +113,11 @@ class IOHandler {
117
113
118
114
int GetErrorFD ();
119
115
120
- FILE *GetInputFILE ();
121
-
122
- FILE *GetOutputFILE ();
123
-
124
- FILE *GetErrorFILE ();
125
-
126
116
lldb::FileSP GetInputFileSP ();
127
117
128
- lldb::StreamFileSP GetOutputStreamFileSP ();
118
+ lldb::LockableStreamFileSP GetOutputStreamFileSP ();
129
119
130
- lldb::StreamFileSP GetErrorStreamFileSP ();
120
+ lldb::LockableStreamFileSP GetErrorStreamFileSP ();
131
121
132
122
Debugger &GetDebugger () { return m_debugger; }
133
123
@@ -160,14 +150,11 @@ class IOHandler {
160
150
161
151
virtual void PrintAsync (const char *s, size_t len, bool is_stdout);
162
152
163
- std::recursive_mutex &GetOutputMutex () { return m_output_mutex; }
164
-
165
153
protected:
166
154
Debugger &m_debugger;
167
155
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;
171
158
Predicate<bool > m_popped;
172
159
Flags m_flags;
173
160
Type m_type;
@@ -335,8 +322,8 @@ class IOHandlerEditline : public IOHandler {
335
322
336
323
IOHandlerEditline (Debugger &debugger, IOHandler::Type type,
337
324
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,
340
327
const char *editline_name, // Used for saving history files
341
328
llvm::StringRef prompt, llvm::StringRef continuation_prompt,
342
329
bool multi_line, bool color,
@@ -350,9 +337,10 @@ class IOHandlerEditline : public IOHandler {
350
337
IOHandlerDelegate &) = delete ;
351
338
352
339
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 ;
356
344
357
345
~IOHandlerEditline () override ;
358
346
0 commit comments