|
LLDB mainline
|
#include <StreamFile.h>
Public Member Functions | |
| StreamFile (uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order) | |
| StreamFile (int fd, bool transfer_ownership) | |
| StreamFile (const char *path, File::OpenOptions options, uint32_t permissions=lldb::eFilePermissionsFileDefault) | |
| StreamFile (FILE *fh, bool transfer_ownership) | |
| StreamFile (std::shared_ptr< File > file) | |
| ~StreamFile () override | |
| File & | GetFile () |
| const File & | GetFile () const |
| std::shared_ptr< File > | GetFileSP () |
| void | Flush () override |
| Flush the stream. | |
| Public Member Functions inherited from lldb_private::Stream | |
| Stream (uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order, bool colors=false) | |
| Construct with flags and address size and byte order. | |
| Stream (bool colors=false) | |
| Construct a default Stream, not binary, host byte order and host addr size. | |
| Stream (const Stream &other) | |
| Stream & | operator= (const Stream &rhs) |
| virtual | ~Stream () |
| Destructor. | |
| size_t | Write (const void *src, size_t src_len) |
| Output character bytes to the stream. | |
| size_t | GetWrittenBytes () const |
| size_t | PutChar (char ch) |
| lldb::ByteOrder | SetByteOrder (lldb::ByteOrder byte_order) |
| Set the byte_order value. | |
| size_t | PrintfAsRawHex8 (const char *format,...) __attribute__((__format__(__printf__ |
| Format a C string from a printf style format and variable arguments and encode and append the resulting C string as hex bytes. | |
| size_t size_t | PutHex8 (uint8_t uvalue) |
| Append an uint8_t value in the hexadecimal format to the stream. | |
| size_t | PutNHex8 (size_t n, uint8_t uvalue) |
| size_t | PutHex16 (uint16_t uvalue, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid) |
| size_t | PutHex32 (uint32_t uvalue, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid) |
| size_t | PutHex64 (uint64_t uvalue, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid) |
| size_t | PutMaxHex64 (uint64_t uvalue, size_t byte_size, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid) |
| size_t | PutFloat (float f, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid) |
| size_t | PutDouble (double d, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid) |
| size_t | PutLongDouble (long double ld, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid) |
| size_t | PutPointer (void *ptr) |
| size_t | PutBytesAsRawHex8 (const void *src, size_t src_len, lldb::ByteOrder src_byte_order=lldb::eByteOrderInvalid, lldb::ByteOrder dst_byte_order=lldb::eByteOrderInvalid) |
| size_t | PutRawBytes (const void *s, size_t src_len, lldb::ByteOrder src_byte_order=lldb::eByteOrderInvalid, lldb::ByteOrder dst_byte_order=lldb::eByteOrderInvalid) |
| size_t | PutStringAsRawHex8 (llvm::StringRef s) |
| Stream & | operator<< (const char *cstr) |
| Output a NULL terminated C string cstr to the stream s. | |
| Stream & | operator<< (llvm::StringRef str) |
| Stream & | operator<< (const void *p) |
| Output a pointer value p to the stream s. | |
| Stream & | operator<< (char ch) |
| Output a character ch to the stream s. | |
| Stream & | operator<< (uint8_t uval)=delete |
| Stream & | operator<< (uint16_t uval)=delete |
| Stream & | operator<< (uint32_t uval)=delete |
| Stream & | operator<< (uint64_t uval)=delete |
| Stream & | operator<< (int8_t sval)=delete |
| Stream & | operator<< (int16_t sval)=delete |
| Stream & | operator<< (int32_t sval)=delete |
| Stream & | operator<< (int64_t sval)=delete |
| size_t | PutCString (llvm::StringRef cstr) |
| Output a C string to the stream. | |
| void | PutCStringColorHighlighted (llvm::StringRef text, std::optional< HighlightSettings > settings=std::nullopt) |
| Output a C string to the stream with color highlighting. | |
| size_t | EOL () |
| Output and End of Line character to the stream. | |
| uint32_t | GetAddressByteSize () const |
| Get the address size in bytes. | |
| Flags & | GetFlags () |
| The flags accessor. | |
| const Flags & | GetFlags () const |
| The flags const accessor. | |
| lldb::ByteOrder | GetByteOrder () const |
| unsigned | GetIndentLevel () const |
| Get the current indentation level. | |
| void | SetIndentLevel (unsigned level) |
| Set the current indentation level. | |
| size_t | Indent (llvm::StringRef s="") |
| Indent the current line in the stream. | |
| void | IndentLess (unsigned amount=2) |
| Decrement the current indentation level. | |
| void | IndentMore (unsigned amount=2) |
| Increment the current indentation level. | |
| IndentScope | MakeIndentScope (unsigned indent_amount=2) |
| Create an indentation scope that restores the original indent level when the object goes out of scope (RAII). | |
| void | Offset (uint32_t offset, const char *format="0x%8.8x: ") |
| Output an offset value. | |
| size_t | Printf (const char *format,...) __attribute__((format(printf |
| Output printf formatted output to the stream. | |
| size_t size_t | PrintfVarArg (const char *format, va_list args) |
| template<typename... Args> | |
| void | Format (const char *format, Args &&... args) |
| void | QuotedCString (const char *cstr, const char *format="\"%s\"") |
| Output a quoted C string value to the stream. | |
| void | SetAddressByteSize (uint32_t addr_size) |
| Set the address size in bytes. | |
| size_t | PutSLEB128 (int64_t uval) |
| Output a SLEB128 number to the stream. | |
| size_t | PutULEB128 (uint64_t uval) |
| Output a ULEB128 number to the stream. | |
| llvm::raw_ostream & | AsRawOstream () |
| Returns a raw_ostream that forwards the data to this Stream object. | |
Protected Member Functions | |
| size_t | WriteImpl (const void *s, size_t length) override |
| Output character bytes to the stream. | |
| Protected Member Functions inherited from lldb_private::Stream | |
| void | _PutHex8 (uint8_t uvalue, bool add_prefix) |
Protected Attributes | |
| std::shared_ptr< File > | m_file_sp |
| Protected Attributes inherited from lldb_private::Stream | |
| Flags | m_flags |
| Dump flags. | |
| uint32_t | m_addr_size = 4 |
| Size of an address in bytes. | |
| lldb::ByteOrder | m_byte_order |
| Byte order to use when encoding scalar types. | |
| unsigned | m_indent_level = 0 |
| Indention level. | |
| std::size_t | m_bytes_written = 0 |
| Number of bytes written so far. | |
| RawOstreamForward | m_forwarder |
Private Member Functions | |
| StreamFile (const StreamFile &)=delete | |
| const StreamFile & | operator= (const StreamFile &)=delete |
Additional Inherited Members | |
| Public Types inherited from lldb_private::Stream | |
| enum | { eBinary = (1 << 0) } |
| m_flags bit values. More... | |
Definition at line 25 of file StreamFile.h.
| StreamFile::StreamFile | ( | uint32_t | flags, |
| uint32_t | addr_size, | ||
| lldb::ByteOrder | byte_order ) |
Definition at line 19 of file StreamFile.cpp.
References m_file_sp, and lldb_private::Stream::Stream().
Referenced by lldb_private::LockedStreamFile::LockedStreamFile(), lldb_private::LockedStreamFile::LockedStreamFile(), operator=(), and StreamFile().
| StreamFile::StreamFile | ( | int | fd, |
| bool | transfer_ownership ) |
Definition at line 24 of file StreamFile.cpp.
References lldb_private::File::eOpenOptionWriteOnly, m_file_sp, and lldb_private::Stream::Stream().
| StreamFile::StreamFile | ( | const char * | path, |
| File::OpenOptions | options, | ||
| uint32_t | permissions = lldb::eFilePermissionsFileDefault ) |
Definition at line 33 of file StreamFile.cpp.
References lldb_private::GetLog(), lldb_private::Host, lldb_private::FileSystem::Instance(), LLDB_LOG_ERROR, m_file_sp, lldb_private::FileSystem::Open(), and lldb_private::Stream::Stream().
| StreamFile::StreamFile | ( | FILE * | fh, |
| bool | transfer_ownership ) |
Definition at line 29 of file StreamFile.cpp.
References m_file_sp, and lldb_private::Stream::Stream().
|
inline |
Definition at line 36 of file StreamFile.h.
References m_file_sp.
|
overridedefault |
|
privatedelete |
References StreamFile().
|
overridevirtual |
Flush the stream.
Subclasses should flush the stream to make any output appear if the stream has any buffering.
Implements lldb_private::Stream.
Definition at line 49 of file StreamFile.cpp.
References m_file_sp.
Referenced by lldb_private::CommandInterpreter::PrintCommandOutput(), and lldb_private::LockedStreamFile::~LockedStreamFile().
|
inline |
Definition at line 40 of file StreamFile.h.
References m_file_sp.
Referenced by lldb_private::Editline::Cancel(), lldb_private::Editline::ConfigureEditor(), lldb_private::Editline::DeleteNextCharCommand(), lldb_private::Editline::DeletePreviousCharCommand(), lldb_private::Editline::DisplayCompletions(), lldb_private::Editline::DisplayInput(), CommandObjectSettingsWrite::DoExecute(), lldb_private::Editline::EndOrAddLineCommand(), lldb_private::Editline::Interrupt(), lldb_private::Editline::MoveCursor(), lldb_private::Editline::NextLineCommand(), lldb_private::Editline::PreviousLineCommand(), lldb_private::Editline::PrintAsync(), lldb_private::Target::SerializeBreakpointsToFile(), and lldb_private::Editline::TypedCharacter().
|
inline |
Definition at line 42 of file StreamFile.h.
References m_file_sp.
|
inline |
Definition at line 44 of file StreamFile.h.
References m_file_sp.
|
privatedelete |
References StreamFile().
|
overrideprotectedvirtual |
Output character bytes to the stream.
Appends src_len characters from the buffer src to the stream.
| [in] | src | A buffer containing at least src_len bytes of data. |
| [in] | src_len | A number of bytes to append to the stream. |
Implements lldb_private::Stream.
Definition at line 51 of file StreamFile.cpp.
References m_file_sp.
|
protected |
Definition at line 50 of file StreamFile.h.
Referenced by Flush(), GetFile(), GetFile(), GetFileSP(), lldb_private::LockedStreamFile::LockedStreamFile(), StreamFile(), StreamFile(), StreamFile(), StreamFile(), StreamFile(), and WriteImpl().