18 return llvm::WithColor(strm.
AsRawOstream(), llvm::HighlightColor::Error,
19 llvm::ColorMode::Enable)
24 return llvm::WithColor(strm.
AsRawOstream(), llvm::HighlightColor::Warning,
25 llvm::ColorMode::Enable)
30 bool add_newline =
false;
34 strm.
Write(s.c_str(), s.size());
36 const char last_char = *s.rbegin();
37 add_newline = last_char !=
'\n' && last_char !=
'\r';
44 : m_out_stream(colors), m_err_stream(colors) {}
52 va_start(args, format);
57 const std::string &s = std::string(sstrm.
GetString());
68 va_start(args, format);
80 va_start(args, format);
89 if (in_string.empty())
95 if (in_string.empty())
102 if (in_string.empty())
105 llvm::StringRef msg(in_string.rtrim());
106 msg.consume_front(
"error: ");
111 const char *fallback_error_cstr) {
126 assert(!in_string.empty() &&
"Expected a non-empty error message");
static llvm::raw_ostream & error(Stream &strm)
static llvm::raw_ostream & warning(Stream &strm)
static void DumpStringToStreamWithNewline(Stream &strm, const std::string &s)
void AppendMessage(llvm::StringRef in_string)
bool GetInteractive() const
void void AppendError(llvm::StringRef in_string)
bool m_suppress_immediate_output
bool m_did_change_process_state
void AppendWarningWithFormat(const char *format,...) __attribute__((format(printf
bool GetDidChangeProcessState() const
bool m_interactive
If true, then the input handle from the debugger will be hooked up.
void SetSuppressImmediateOutput(bool b)
CommandReturnObject(bool colors)
void SetInteractive(bool b)
void AppendRawError(llvm::StringRef in_string)
Stream & GetErrorStream()
void SetStatus(lldb::ReturnStatus status)
void AppendErrorWithFormat(const char *format,...) __attribute__((format(printf
void AppendMessageWithFormat(const char *format,...) __attribute__((format(printf
void SetDidChangeProcessState(bool b)
lldb::ReturnStatus GetStatus() const
lldb::ReturnStatus m_status
bool GetSuppressImmediateOutput() const
void void AppendWarning(llvm::StringRef in_string)
void SetError(const Status &error, const char *fallback_error_cstr=nullptr)
Stream & GetOutputStream()
llvm::StringRef GetString() const
lldb::StreamSP GetStreamAtIndex(uint32_t idx)
A stream class that can stream formatted output to a file.
size_t Write(const void *src, size_t src_len)
Output character bytes to the stream.
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
size_t size_t PrintfVarArg(const char *format, va_list args)
size_t EOL()
Output and End of Line character to the stream.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Stream > StreamSP
ReturnStatus
Command Return Status Types.
@ eReturnStatusSuccessContinuingResult
@ eReturnStatusSuccessFinishResult