LLDB  mainline
Public Member Functions | List of all members
lldb_private::StreamGDBRemote Class Reference

#include <StreamGDBRemote.h>

Inheritance diagram for lldb_private::StreamGDBRemote:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::StreamGDBRemote:
Collaboration graph
[legend]

Public Member Functions

 StreamGDBRemote ()
 
 StreamGDBRemote (uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order)
 
 ~StreamGDBRemote () override
 
int PutEscapedBytes (const void *s, size_t src_len)
 Output a block of data to the stream performing GDB-remote escaping. More...
 
- Public Member Functions inherited from lldb_private::StreamString
 StreamString ()
 
 StreamString (uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order)
 
 ~StreamString () override
 
void Flush () override
 Flush the stream. More...
 
void Clear ()
 
bool Empty () const
 
size_t GetSize () const
 
size_t GetSizeOfLastLine () const
 
llvm::StringRef GetString () const
 
const char * GetData () const
 
void FillLastLineToColumn (uint32_t column, char fill_char)
 
- Public Member Functions inherited from lldb_private::Stream
 Stream (uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order)
 Construct with flags and address size and byte order. More...
 
 Stream ()
 Construct a default Stream, not binary, host byte order and host addr size. More...
 
 Stream (const Stream &other)
 
Streamoperator= (const Stream &rhs)
 
virtual ~Stream ()
 Destructor. More...
 
size_t Write (const void *src, size_t src_len)
 Output character bytes to the stream. More...
 
size_t GetWrittenBytes () const
 
size_t PutChar (char ch)
 
lldb::ByteOrder SetByteOrder (lldb::ByteOrder byte_order)
 Set the byte_order value. More...
 
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. More...
 
size_t size_t PutHex8 (uint8_t uvalue)
 Append an uint8_t value in the hexadecimal format to the stream. More...
 
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)
 
Streamoperator<< (const char *cstr)
 Output a NULL terminated C string cstr to the stream s. More...
 
Streamoperator<< (llvm::StringRef str)
 
Streamoperator<< (const void *p)
 Output a pointer value p to the stream s. More...
 
Streamoperator<< (char ch)
 Output a character ch to the stream s. More...
 
Streamoperator<< (uint8_t uval)
 Output a uint8_t uval to the stream s. More...
 
Streamoperator<< (uint16_t uval)
 Output a uint16_t uval to the stream s. More...
 
Streamoperator<< (uint32_t uval)
 Output a uint32_t uval to the stream s. More...
 
Streamoperator<< (uint64_t uval)
 Output a uint64_t uval to the stream s. More...
 
Streamoperator<< (int8_t sval)
 Output a int8_t sval to the stream s. More...
 
Streamoperator<< (int16_t sval)
 Output a int16_t sval to the stream s. More...
 
Streamoperator<< (int32_t sval)
 Output a int32_t sval to the stream s. More...
 
Streamoperator<< (int64_t sval)
 Output a int64_t sval to the stream s. More...
 
void Address (uint64_t addr, uint32_t addr_size, const char *prefix=nullptr, const char *suffix=nullptr)
 Output an address value to this stream. More...
 
void AddressRange (uint64_t lo_addr, uint64_t hi_addr, uint32_t addr_size, const char *prefix=nullptr, const char *suffix=nullptr)
 Output an address range to this stream. More...
 
size_t PutCString (llvm::StringRef cstr)
 Output a C string to the stream. More...
 
size_t EOL ()
 Output and End of Line character to the stream. More...
 
uint32_t GetAddressByteSize () const
 Get the address size in bytes. More...
 
FlagsGetFlags ()
 The flags accessor. More...
 
const FlagsGetFlags () const
 The flags const accessor. More...
 
lldb::ByteOrder GetByteOrder () const
 
int GetIndentLevel () const
 Get the current indentation level. More...
 
size_t Indent (const char *s=nullptr)
 Indent the current line in the stream. More...
 
size_t Indent (llvm::StringRef s)
 
void IndentLess (int amount=2)
 Decrement the current indentation level. More...
 
void IndentMore (int amount=2)
 Increment the current indentation level. More...
 
void Offset (uint32_t offset, const char *format="0x%8.8x: ")
 Output an offset value. More...
 
size_t Printf (const char *format,...) __attribute__((format(printf
 Output printf formatted output to the stream. More...
 
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. More...
 
void SetAddressByteSize (uint32_t addr_size)
 Set the address size in bytes. More...
 
void SetIndentLevel (int level)
 Set the current indentation level. More...
 
size_t PutSLEB128 (int64_t uval)
 Output a SLEB128 number to the stream. More...
 
size_t PutULEB128 (uint64_t uval)
 Output a ULEB128 number to the stream. More...
 
llvm::raw_ostream & AsRawOstream ()
 Returns a raw_ostream that forwards the data to this Stream object. More...
 

Additional Inherited Members

- Public Types inherited from lldb_private::Stream
enum  { eBinary = (1 << 0) }
 m_flags bit values. More...
 
- Protected Member Functions inherited from lldb_private::StreamString
size_t WriteImpl (const void *s, size_t length) override
 Output character bytes to the stream. More...
 
- Protected Member Functions inherited from lldb_private::Stream
void _PutHex8 (uint8_t uvalue, bool add_prefix)
 
- Protected Attributes inherited from lldb_private::StreamString
std::string m_packet
 
- Protected Attributes inherited from lldb_private::Stream
Flags m_flags
 Dump flags. More...
 
uint32_t m_addr_size
 Size of an address in bytes. More...
 
lldb::ByteOrder m_byte_order
 Byte order to use when encoding scalar types. More...
 
int m_indent_level
 Indention level. More...
 
std::size_t m_bytes_written = 0
 Number of bytes written so far. More...
 
RawOstreamForward m_forwarder
 

Detailed Description

Definition at line 20 of file StreamGDBRemote.h.

Constructor & Destructor Documentation

◆ StreamGDBRemote() [1/2]

StreamGDBRemote::StreamGDBRemote ( )

Definition at line 19 of file StreamGDBRemote.cpp.

◆ StreamGDBRemote() [2/2]

StreamGDBRemote::StreamGDBRemote ( uint32_t  flags,
uint32_t  addr_size,
lldb::ByteOrder  byte_order 
)

Definition at line 21 of file StreamGDBRemote.cpp.

◆ ~StreamGDBRemote()

StreamGDBRemote::~StreamGDBRemote ( )
override

Definition at line 25 of file StreamGDBRemote.cpp.

Member Function Documentation

◆ PutEscapedBytes()

int StreamGDBRemote::PutEscapedBytes ( const void *  s,
size_t  src_len 
)

Output a block of data to the stream performing GDB-remote escaping.

Parameters
[in]sA block of data.
[in]src_lenThe amount of data to write.
Returns
Number of bytes written.

Definition at line 27 of file StreamGDBRemote.cpp.

References lldb_private::Flags::Clear(), lldb_private::Stream::eBinary, lldb_private::Stream::m_flags, lldb_private::Stream::PutChar(), lldb_private::Flags::Set(), lldb_private::Flags::Test(), x23, and x24.

Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ConfigureRemoteStructuredData(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoWriteMemory(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModulesInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_jModulesInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jThreadsInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jTraceConfigRead(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jTraceRead(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_memory_read(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerPlatform::Handle_qQueryGDBServer(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qXfer_auxv_read(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_vFile_pRead(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendGetTraceConfigPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendGetTraceDataPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendStartTracePacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendStopTracePacket(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::WriteFile().


The documentation for this class was generated from the following files: