31 std::swap(*
this, copy);
76 return this->
operator bool();
78SBCommandReturnObject::operator bool()
const {
125 return file_sp->Printf(
"%s",
GetOutput());
140 return ::fprintf(fh,
"%s",
GetError());
149 return file_sp->Printf(
"%s",
GetError());
222 description.Printf(
"Error: ");
255 bool transfer_ownership) {
262 bool transfer_ownership) {
291 if (len == 0 ||
string ==
nullptr || *
string == 0) {
293 }
else if (len > 0) {
294 std::string buffer(
string, len);
303 if (!only_if_no_immediate ||
304 ref().GetImmediateOutputStream().
get() ==
nullptr)
312 if (!only_if_no_immediate ||
ref().GetImmediateErrorStream().
get() ==
nullptr)
317size_t SBCommandReturnObject::Printf(
const char *format, ...) {
319 va_start(args, format);
326 const char *fallback_error_cstr) {
331 else if (fallback_error_cstr)
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INSTRUMENT_VA(...)
lldb_private::CommandReturnObject * get() const
void SetImmediateErrorFile(SBFile file)
lldb_private::CommandReturnObject & operator*() const
void SetStatus(lldb::ReturnStatus status)
bool GetDescription(lldb::SBStream &description)
lldb_private::CommandReturnObject * operator->() const
lldb::ReturnStatus GetStatus()
lldb::SBCommandReturnObject & operator=(const lldb::SBCommandReturnObject &rhs)
void SetError(lldb::SBError &error, const char *fallback_error_cstr=nullptr)
void AppendMessage(const char *message)
void SetImmediateOutputFile(SBFile file)
lldb_private::CommandReturnObject & ref() const
void AppendWarning(const char *message)
void PutCString(const char *string, int len=-1)
size_t PutOutput(SBFile file)
std::unique_ptr< lldb_private::SBCommandReturnObjectImpl > m_opaque_up
size_t PutError(SBFile file)
lldb_private::Stream & ref()
void AppendMessage(llvm::StringRef in_string)
void SetImmediateErrorFile(lldb::FileSP file_sp)
void void AppendError(llvm::StringRef in_string)
llvm::StringRef GetErrorData()
llvm::StringRef GetOutputData()
void SetStatus(lldb::ReturnStatus status)
lldb::ReturnStatus GetStatus() const
void SetImmediateOutputFile(lldb::FileSP file_sp)
void void AppendWarning(llvm::StringRef in_string)
void SetError(const Status &error, const char *fallback_error_cstr=nullptr)
Stream & GetOutputStream()
A uniqued constant string class.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
SBCommandReturnObjectImpl()
CommandReturnObject & operator*() const
SBCommandReturnObjectImpl(const SBCommandReturnObjectImpl &rhs)
CommandReturnObject * m_ptr
SBCommandReturnObjectImpl(CommandReturnObject &ref)
SBCommandReturnObjectImpl & operator=(const SBCommandReturnObjectImpl &rhs)
~SBCommandReturnObjectImpl()
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
size_t size_t PrintfVarArg(const char *format, va_list args)
A class that represents a running process on the host machine.
std::unique_ptr< T > clone(const std::unique_ptr< T > &src)
ReturnStatus
Command Return Status Types.
std::shared_ptr< lldb_private::File > FileSP