9#ifndef LLDB_API_SBCOMMANDRETURNOBJECT_H
10#define LLDB_API_SBCOMMANDRETURNOBJECT_H
19class CommandPluginInterfaceImplementation;
20class SBCommandReturnObjectImpl;
41 explicit operator bool()
const;
45 const char *GetOutput();
47 const char *GetError();
52 size_t PutOutput(FILE *fh);
55 size_t PutOutput(
SBFile file);
57 size_t PutOutput(
FileSP BORROWED);
59 size_t GetOutputSize();
61 size_t GetErrorSize();
66 size_t PutError(FILE *fh);
69 size_t PutError(
SBFile file);
71 size_t PutError(
FileSP BORROWED);
83 void AppendMessage(
const char *message);
85 void AppendWarning(
const char *message);
91 "Use SetImmediateOutputFile(SBFile) or SetImmediateOutputFile(FileSP)",
92 "SetImmediateOutputFile(SBFile)")
93 void SetImmediateOutputFile(FILE *fh);
96 "Use SetImmediateErrorFile(
SBFile) or SetImmediateErrorFile(
FileSP)",
97 "SetImmediateErrorFile(
SBFile)")
98 void SetImmediateErrorFile(FILE *fh);
101 "Use SetImmediateOutputFile(
SBFile) or SetImmediateOutputFile(
FileSP)",
102 "SetImmediateOutputFile(
SBFile)")
103 void SetImmediateOutputFile(FILE *fh,
bool transfer_ownership);
106 "Use SetImmediateErrorFile(
SBFile) or SetImmediateErrorFile(
FileSP)",
107 "SetImmediateErrorFile(
SBFile)")
108 void SetImmediateErrorFile(FILE *fh,
bool transfer_ownership);
111 void SetImmediateOutputFile(
SBFile file);
113 void SetImmediateErrorFile(
SBFile file);
115 void SetImmediateOutputFile(
FileSP BORROWED);
117 void SetImmediateErrorFile(
FileSP BORROWED);
119 void PutCString(
const char *
string,
int len = -1);
122 __attribute__((format(printf, 2, 3))) size_t Printf(const
char *format, ...);
125 const char *GetOutput(
bool only_if_no_immediate);
127 const char *GetError(
bool only_if_no_immediate);
130 const char *fallback_error_cstr =
nullptr);
132 void SetError(
const char *error_cstr);
136 friend class SBOptions;
139 friend class lldb_private::python::SWIGBridge;
152 std::unique_ptr<lldb_private::SBCommandReturnObjectImpl>
m_opaque_up;
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_DEPRECATED_FIXME(MSG, FIX)
LLDB_DEPRECATED_FIXME("Use PutOutput(SBFile) or PutOutput(FileSP)", "PutOutput(SBFile)") size_t PutOutput(FILE *fh)
LLDB_DEPRECATED_FIXME("Use SetImmediateOutputFile(SBFile) or SetImmediateOutputFile(FileSP)", "SetImmediateOutputFile(SBFile)") void SetImmediateOutputFile(FILE *fh)
LLDB_DEPRECATED_FIXME("Use PutError(SBFile) or PutError(FileSP)", "PutError(SBFile)") size_t PutError(FILE *fh)
std::unique_ptr< lldb_private::SBCommandReturnObjectImpl > m_opaque_up
__attribute__((format(printf, 2, 3))) size_t Printf(const char *format
A class that represents a running process on the host machine.
ReturnStatus
Command Return Status Types.
std::shared_ptr< lldb_private::File > FileSP