9#ifndef LLDB_INTERPRETER_COMMANDRETURNOBJECT_H
10#define LLDB_INTERPRETER_COMMANDRETURNOBJECT_H
17#include "llvm/ADT/StringRef.h"
18#include "llvm/Support/Error.h"
19#include "llvm/Support/FormatVariadic.h"
20#include "llvm/Support/WithColor.h"
35 return std::static_pointer_cast<StreamString>(stream_sp)->GetString();
36 return llvm::StringRef();
42 return std::static_pointer_cast<StreamString>(stream_sp)->GetString();
43 return llvm::StringRef();
50 stream_sp = std::make_shared<StreamString>();
60 stream_sp = std::make_shared<StreamString>();
105 __attribute__((format(printf, 2, 3)));
110 __attribute__((format(printf, 2, 3)));
117 __attribute__((format(printf, 2, 3)));
119 template <typename...
Args>
121 AppendMessage(llvm::formatv(format, std::forward<Args>(args)...).str());
124 template <
typename...
Args>
126 AppendWarning(llvm::formatv(format, std::forward<Args>(args)...).str());
129 template <
typename...
Args>
131 AppendError(llvm::formatv(format, std::forward<Args>(args)...).str());
static llvm::raw_ostream & error(Stream &strm)
A command line argument class.
void AppendErrorWithFormatv(const char *format, Args &&... args)
void AppendMessage(llvm::StringRef in_string)
bool GetInteractive() const
void SetImmediateErrorStream(const lldb::StreamSP &stream_sp)
void SetImmediateErrorFile(lldb::FileSP file_sp)
void void AppendError(llvm::StringRef in_string)
bool m_suppress_immediate_output
lldb::StreamSP GetImmediateOutputStream()
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)
void AppendWarningWithFormatv(const char *format, Args &&... args)
llvm::StringRef GetErrorData()
void SetInteractive(bool b)
void AppendRawError(llvm::StringRef in_string)
llvm::StringRef GetOutputData()
Stream & GetErrorStream()
void SetStatus(lldb::ReturnStatus status)
void void AppendMessageWithFormatv(const char *format, Args &&... args)
~CommandReturnObject()=default
void SetImmediateOutputStream(const lldb::StreamSP &stream_sp)
void AppendErrorWithFormat(const char *format,...) __attribute__((format(printf
void AppendMessageWithFormat(const char *format,...) __attribute__((format(printf
lldb::StreamSP GetImmediateErrorStream()
void SetDidChangeProcessState(bool b)
lldb::ReturnStatus GetStatus() const
void SetImmediateOutputFile(lldb::FileSP file_sp)
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()
void SetStreamAtIndex(uint32_t idx, const lldb::StreamSP &stream_sp)
lldb::StreamSP GetStreamAtIndex(uint32_t idx)
A stream class that can stream formatted output to a file.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Stream > StreamSP
ReturnStatus
Command Return Status Types.
std::shared_ptr< lldb_private::File > FileSP