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

#include <DWARFDataExtractor.h>

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

Public Member Functions

 DWARFDataExtractor ()=default
 
 DWARFDataExtractor (const DWARFDataExtractor &data, lldb::offset_t offset, lldb::offset_t length)
 
uint64_t GetDWARFInitialLength (lldb::offset_t *offset_ptr) const
 
dw_offset_t GetDWARFOffset (lldb::offset_t *offset_ptr) const
 
size_t GetDWARFSizeofInitialLength () const
 
size_t GetDWARFSizeOfOffset () const
 
- Public Member Functions inherited from lldb_private::DataExtractor
 DataExtractor ()
 Default constructor. More...
 
 DataExtractor (const void *data, lldb::offset_t data_length, lldb::ByteOrder byte_order, uint32_t addr_size, uint32_t target_byte_size=1)
 Construct with a buffer that is owned by the caller. More...
 
 DataExtractor (const lldb::DataBufferSP &data_sp, lldb::ByteOrder byte_order, uint32_t addr_size, uint32_t target_byte_size=1)
 Construct with shared data. More...
 
 DataExtractor (const DataExtractor &data, lldb::offset_t offset, lldb::offset_t length, uint32_t target_byte_size=1)
 Construct with a subset of data. More...
 
 DataExtractor (const DataExtractor &rhs)
 
const DataExtractoroperator= (const DataExtractor &rhs)
 Assignment operator. More...
 
virtual ~DataExtractor ()
 Destructor. More...
 
uint32_t getTargetByteSize () const
 
void Clear ()
 Clears the object state. More...
 
lldb::offset_t PutToLog (Log *log, lldb::offset_t offset, lldb::offset_t length, uint64_t base_addr, uint32_t num_per_line, Type type, const char *type_format=nullptr) const
 Dumps the binary data as type objects to stream s (or to Log() if s is nullptr) starting offset bytes into the data and stopping after dumping length bytes. More...
 
size_t ExtractBytes (lldb::offset_t offset, lldb::offset_t length, lldb::ByteOrder dst_byte_order, void *dst) const
 Extract an arbitrary number of bytes in the specified byte order. More...
 
uint64_t GetAddress (lldb::offset_t *offset_ptr) const
 Extract an address from *offset_ptr. More...
 
uint64_t GetAddress_unchecked (lldb::offset_t *offset_ptr) const
 
uint32_t GetAddressByteSize () const
 Get the current address size. More...
 
uint64_t GetByteSize () const
 Get the number of bytes contained in this object. More...
 
const char * GetCStr (lldb::offset_t *offset_ptr) const
 Extract a C string from *offset_ptr. More...
 
const char * GetCStr (lldb::offset_t *offset_ptr, lldb::offset_t len) const
 Extract a C string from *offset_ptr with field size len. More...
 
const void * GetData (lldb::offset_t *offset_ptr, lldb::offset_t length) const
 Extract length bytes from *offset_ptr. More...
 
lldb::offset_t CopyData (lldb::offset_t offset, lldb::offset_t length, void *dst) const
 Copy length bytes from *offset, without swapping bytes. More...
 
lldb::offset_t CopyByteOrderedData (lldb::offset_t src_offset, lldb::offset_t src_len, void *dst, lldb::offset_t dst_len, lldb::ByteOrder dst_byte_order) const
 Copy dst_len bytes from *offset_ptr and ensure the copied data is treated as a value that can be swapped to match the specified byte order. More...
 
const uint8_t * GetDataEnd () const
 Get the data end pointer. More...
 
size_t GetSharedDataOffset () const
 Get the shared data offset. More...
 
const uint8_t * GetDataStart () const
 Get the data start pointer. More...
 
float GetFloat (lldb::offset_t *offset_ptr) const
 Extract a float from *offset_ptr. More...
 
double GetDouble (lldb::offset_t *offset_ptr) const
 
long double GetLongDouble (lldb::offset_t *offset_ptr) const
 
uint32_t GetMaxU32 (lldb::offset_t *offset_ptr, size_t byte_size) const
 Extract an integer of size byte_size from *offset_ptr. More...
 
uint64_t GetMaxU64 (lldb::offset_t *offset_ptr, size_t byte_size) const
 Extract an unsigned integer of size byte_size from *offset_ptr. More...
 
uint64_t GetMaxU64_unchecked (lldb::offset_t *offset_ptr, size_t byte_size) const
 
int64_t GetMaxS64 (lldb::offset_t *offset_ptr, size_t byte_size) const
 Extract an signed integer of size byte_size from *offset_ptr. More...
 
uint64_t GetMaxU64Bitfield (lldb::offset_t *offset_ptr, size_t size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset) const
 Extract an unsigned integer of size byte_size from *offset_ptr, then extract the bitfield from this value if bitfield_bit_size is non-zero. More...
 
int64_t GetMaxS64Bitfield (lldb::offset_t *offset_ptr, size_t size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset) const
 Extract an signed integer of size byte_size from *offset_ptr, then extract and signe extend the bitfield from this value if bitfield_bit_size is non-zero. More...
 
uint64_t GetPointer (lldb::offset_t *offset_ptr) const
 Extract an pointer from *offset_ptr. More...
 
lldb::ByteOrder GetByteOrder () const
 Get the current byte order value. More...
 
uint8_t GetU8 (lldb::offset_t *offset_ptr) const
 Extract a uint8_t value from *offset_ptr. More...
 
uint8_t GetU8_unchecked (lldb::offset_t *offset_ptr) const
 
uint16_t GetU16_unchecked (lldb::offset_t *offset_ptr) const
 
uint32_t GetU32_unchecked (lldb::offset_t *offset_ptr) const
 
uint64_t GetU64_unchecked (lldb::offset_t *offset_ptr) const
 
void * GetU8 (lldb::offset_t *offset_ptr, void *dst, uint32_t count) const
 Extract count uint8_t values from *offset_ptr. More...
 
uint16_t GetU16 (lldb::offset_t *offset_ptr) const
 Extract a uint16_t value from *offset_ptr. More...
 
void * GetU16 (lldb::offset_t *offset_ptr, void *dst, uint32_t count) const
 Extract count uint16_t values from *offset_ptr. More...
 
uint32_t GetU32 (lldb::offset_t *offset_ptr) const
 Extract a uint32_t value from *offset_ptr. More...
 
void * GetU32 (lldb::offset_t *offset_ptr, void *dst, uint32_t count) const
 Extract count uint32_t values from *offset_ptr. More...
 
uint64_t GetU64 (lldb::offset_t *offset_ptr) const
 Extract a uint64_t value from *offset_ptr. More...
 
void * GetU64 (lldb::offset_t *offset_ptr, void *dst, uint32_t count) const
 Extract count uint64_t values from *offset_ptr. More...
 
int64_t GetSLEB128 (lldb::offset_t *offset_ptr) const
 Extract a signed LEB128 value from *offset_ptr. More...
 
uint64_t GetULEB128 (lldb::offset_t *offset_ptr) const
 Extract a unsigned LEB128 value from *offset_ptr. More...
 
lldb::DataBufferSP & GetSharedDataBuffer ()
 
const char * PeekCStr (lldb::offset_t offset) const
 Peek at a C string at offset. More...
 
const uint8_t * PeekData (lldb::offset_t offset, lldb::offset_t length) const
 Peek at a bytes at offset. More...
 
void SetAddressByteSize (uint32_t addr_size)
 Set the address byte size. More...
 
lldb::offset_t SetData (const void *bytes, lldb::offset_t length, lldb::ByteOrder byte_order)
 Set data with a buffer that is caller owned. More...
 
lldb::offset_t SetData (const DataExtractor &data, lldb::offset_t offset, lldb::offset_t length)
 Adopt a subset of data. More...
 
lldb::offset_t SetData (const lldb::DataBufferSP &data_sp, lldb::offset_t offset=0, lldb::offset_t length=LLDB_INVALID_OFFSET)
 Adopt a subset of shared data in data_sp. More...
 
void SetByteOrder (lldb::ByteOrder byte_order)
 Set the byte_order value. More...
 
uint32_t Skip_LEB128 (lldb::offset_t *offset_ptr) const
 Skip an LEB128 number at *offset_ptr. More...
 
bool ValidOffset (lldb::offset_t offset) const
 Test the validity of offset. More...
 
bool ValidOffsetForDataOfSize (lldb::offset_t offset, lldb::offset_t length) const
 Test the availability of length bytes of data from offset. More...
 
size_t Copy (DataExtractor &dest_data) const
 
bool Append (DataExtractor &rhs)
 
bool Append (void *bytes, lldb::offset_t length)
 
lldb::offset_t BytesLeft (lldb::offset_t offset) const
 
void Checksum (llvm::SmallVectorImpl< uint8_t > &dest, uint64_t max_data=0)
 
llvm::ArrayRef< uint8_t > GetData () const
 

Additional Inherited Members

- Public Types inherited from lldb_private::DataExtractor
enum  Type {
  TypeUInt8, TypeChar, TypeUInt16, TypeUInt32,
  TypeUInt64, TypePointer, TypeULEB128, TypeSLEB128
}
 Type enumerations used in the dump routines. More...
 
- Protected Attributes inherited from lldb_private::DataExtractor
const uint8_t * m_start
 A pointer to the first byte of data. More...
 
const uint8_t * m_end
 A pointer to the byte that is past the end of the data. More...
 
lldb::ByteOrder m_byte_order
 The byte order of the data we are extracting from. More...
 
uint32_t m_addr_size
 The address size to use when extracting pointers or addresses. More...
 
lldb::DataBufferSP m_data_sp
 The shared pointer to data that can be shared among multiple instances. More...
 
const uint32_t m_target_byte_size
 

Detailed Description

Definition at line 17 of file DWARFDataExtractor.h.

Constructor & Destructor Documentation

◆ DWARFDataExtractor() [1/2]

lldb_private::DWARFDataExtractor::DWARFDataExtractor ( )
default

◆ DWARFDataExtractor() [2/2]

lldb_private::DWARFDataExtractor::DWARFDataExtractor ( const DWARFDataExtractor data,
lldb::offset_t  offset,
lldb::offset_t  length 
)
inline

Definition at line 21 of file DWARFDataExtractor.h.

References GetDWARFInitialLength(), and GetDWARFOffset().

Member Function Documentation

◆ GetDWARFInitialLength()

uint64_t lldb_private::DWARFDataExtractor::GetDWARFInitialLength ( lldb::offset_t offset_ptr) const

◆ GetDWARFOffset()

dw_offset_t lldb_private::DWARFDataExtractor::GetDWARFOffset ( lldb::offset_t offset_ptr) const

◆ GetDWARFSizeofInitialLength()

size_t lldb_private::DWARFDataExtractor::GetDWARFSizeofInitialLength ( ) const
inline

Definition at line 29 of file DWARFDataExtractor.h.

Referenced by DWARFDebugLine::ParseStatementTable().

◆ GetDWARFSizeOfOffset()

size_t lldb_private::DWARFDataExtractor::GetDWARFSizeOfOffset ( ) const
inline

Definition at line 30 of file DWARFDataExtractor.h.

Referenced by GetDWARFOffset().


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