}
void SetImmediateOutputFile(lldb::FileSP file_sp) {
+ if (m_suppress_immediate_output)
+ return;
lldb::StreamSP stream_sp(new StreamFile(file_sp));
m_out_stream.SetStreamAtIndex(eImmediateStreamIndex, stream_sp);
}
void SetImmediateErrorFile(lldb::FileSP file_sp) {
+ if (m_suppress_immediate_output)
+ return;
lldb::StreamSP stream_sp(new StreamFile(file_sp));
m_err_stream.SetStreamAtIndex(eImmediateStreamIndex, stream_sp);
}
void SetImmediateOutputStream(const lldb::StreamSP &stream_sp) {
+ if (m_suppress_immediate_output)
+ return;
m_out_stream.SetStreamAtIndex(eImmediateStreamIndex, stream_sp);
}
void SetImmediateErrorStream(const lldb::StreamSP &stream_sp) {
+ if (m_suppress_immediate_output)
+ return;
m_err_stream.SetStreamAtIndex(eImmediateStreamIndex, stream_sp);
}
void SetInteractive(bool b);
+ bool GetSuppressImmediateOutput() const;
+
+ void SetSuppressImmediateOutput(bool b);
+
private:
enum { eStreamStringIndex = 0, eImmediateStreamIndex = 1 };
StreamTee m_out_stream;
StreamTee m_err_stream;
- lldb::ReturnStatus m_status;
- bool m_did_change_process_state;
- bool m_interactive; // If true, then the input handle from the debugger will
- // be hooked up
+ lldb::ReturnStatus m_status = lldb::eReturnStatusStarted;
+
+ bool m_did_change_process_state = false;
+ bool m_suppress_immediate_output = false;
+
+ /// If true, then the input handle from the debugger will be hooked up.
+ bool m_interactive = true;
};
} // namespace lldb_private
}
CommandReturnObject::CommandReturnObject(bool colors)
- : m_out_stream(colors), m_err_stream(colors),
- m_status(eReturnStatusStarted), m_did_change_process_state(false),
- m_interactive(true) {}
+ : m_out_stream(colors), m_err_stream(colors) {}
void CommandReturnObject::AppendErrorWithFormat(const char *format, ...) {
SetStatus(eReturnStatusFailed);
static_cast<StreamString *>(stream_sp.get())->Clear();
m_status = eReturnStatusStarted;
m_did_change_process_state = false;
+ m_suppress_immediate_output = false;
m_interactive = true;
}
bool CommandReturnObject::GetInteractive() const { return m_interactive; }
void CommandReturnObject::SetInteractive(bool b) { m_interactive = b; }
+
+bool CommandReturnObject::GetSuppressImmediateOutput() const {
+ return m_suppress_immediate_output;
+}
+
+void CommandReturnObject::SetSuppressImmediateOutput(bool b) {
+ m_suppress_immediate_output = b;
+}