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]

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
 
llvm::DWARFDataExtractor GetAsLLVMDWARF () const
 
llvm::DataExtractor GetAsLLVM () const
 
- Public Member Functions inherited from lldb_private::DataExtractor
 DataExtractor ()
 Default constructor.
 
 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.
 
 DataExtractor (const lldb::DataBufferSP &data_sp, lldb::ByteOrder byte_order, uint32_t addr_size, uint32_t target_byte_size=1)
 Construct with shared data.
 
 DataExtractor (const DataExtractor &data, lldb::offset_t offset, lldb::offset_t length, uint32_t target_byte_size=1)
 Construct with a subset of data.
 
 DataExtractor (const DataExtractor &rhs)
 Copy constructor.
 
const DataExtractoroperator= (const DataExtractor &rhs)
 Assignment operator.
 
 DataExtractor (DataExtractor &&rhs)=default
 Move constructor and move assignment operators to complete the rule of 5.
 
DataExtractoroperator= (DataExtractor &&rhs)=default
 
virtual ~DataExtractor ()
 Destructor.
 
uint32_t getTargetByteSize () const
 
void Clear ()
 Clears the object state.
 
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
 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.
 
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.
 
uint64_t GetAddress (lldb::offset_t *offset_ptr) const
 Extract an address from *offset_ptr.
 
uint64_t GetAddress_unchecked (lldb::offset_t *offset_ptr) const
 
uint32_t GetAddressByteSize () const
 Get the current address size.
 
uint64_t GetByteSize () const
 Get the number of bytes contained in this object.
 
const char * GetCStr (lldb::offset_t *offset_ptr) const
 Extract a C string from *offset_ptr.
 
const char * GetCStr (lldb::offset_t *offset_ptr, lldb::offset_t len) const
 Extract a C string from *offset_ptr with field size len.
 
const void * GetData (lldb::offset_t *offset_ptr, lldb::offset_t length) const
 Extract length bytes from *offset_ptr.
 
lldb::offset_t CopyData (lldb::offset_t offset, lldb::offset_t length, void *dst) const
 Copy length bytes from *offset, without swapping bytes.
 
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.
 
const uint8_t * GetDataEnd () const
 Get the data end pointer.
 
size_t GetSharedDataOffset () const
 Get the shared data offset.
 
const uint8_t * GetDataStart () const
 Get the data start pointer.
 
float GetFloat (lldb::offset_t *offset_ptr) const
 Extract a float from *offset_ptr.
 
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.
 
uint64_t GetMaxU64 (lldb::offset_t *offset_ptr, size_t byte_size) const
 Extract an unsigned integer of size byte_size from *offset_ptr.
 
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.
 
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.
 
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 size from *offset_ptr, then extract and sign-extend the bitfield from this value if bitfield_bit_size is non-zero.
 
lldb::ByteOrder GetByteOrder () const
 Get the current byte order value.
 
uint8_t GetU8 (lldb::offset_t *offset_ptr) const
 Extract a uint8_t value from *offset_ptr.
 
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.
 
uint16_t GetU16 (lldb::offset_t *offset_ptr) const
 Extract a uint16_t value from *offset_ptr.
 
void * GetU16 (lldb::offset_t *offset_ptr, void *dst, uint32_t count) const
 Extract count uint16_t values from *offset_ptr.
 
uint32_t GetU32 (lldb::offset_t *offset_ptr) const
 Extract a uint32_t value from *offset_ptr.
 
void * GetU32 (lldb::offset_t *offset_ptr, void *dst, uint32_t count) const
 Extract count uint32_t values from *offset_ptr.
 
uint64_t GetU64 (lldb::offset_t *offset_ptr) const
 Extract a uint64_t value from *offset_ptr.
 
void * GetU64 (lldb::offset_t *offset_ptr, void *dst, uint32_t count) const
 Extract count uint64_t values from *offset_ptr.
 
int64_t GetSLEB128 (lldb::offset_t *offset_ptr) const
 Extract a signed LEB128 value from *offset_ptr.
 
uint64_t GetULEB128 (lldb::offset_t *offset_ptr) const
 Extract a unsigned LEB128 value from *offset_ptr.
 
lldb::DataBufferSPGetSharedDataBuffer ()
 
const char * PeekCStr (lldb::offset_t offset) const
 Peek at a C string at offset.
 
const uint8_t * PeekData (lldb::offset_t offset, lldb::offset_t length) const
 Peek at a bytes at offset.
 
void SetAddressByteSize (uint32_t addr_size)
 Set the address byte size.
 
lldb::offset_t SetData (const void *bytes, lldb::offset_t length, lldb::ByteOrder byte_order)
 Set data with a buffer that is caller owned.
 
lldb::offset_t SetData (const DataExtractor &data, lldb::offset_t offset, lldb::offset_t length)
 Adopt a subset of data.
 
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.
 
void SetByteOrder (lldb::ByteOrder byte_order)
 Set the byte_order value.
 
uint32_t Skip_LEB128 (lldb::offset_t *offset_ptr) const
 Skip an LEB128 number at *offset_ptr.
 
bool ValidOffset (lldb::offset_t offset) const
 Test the validity of offset.
 
bool ValidOffsetForDataOfSize (lldb::offset_t offset, lldb::offset_t length) const
 Test the availability of length bytes of data from offset.
 
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
 
llvm::DataExtractor GetAsLLVM () 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 Member Functions inherited from lldb_private::DataExtractor
template<typename T >
Get (lldb::offset_t *offset_ptr, T fail_value) const
 
- Protected Attributes inherited from lldb_private::DataExtractor
const uint8_t * m_start = nullptr
 A pointer to the first byte of data.
 
const uint8_t * m_end
 A pointer to the byte that is past the end of the data.
 
lldb::ByteOrder m_byte_order
 The byte order of the data we are extracting from.
 
uint32_t m_addr_size
 The address size to use when extracting addresses.
 
lldb::DataBufferSP m_data_sp
 The shared pointer to data that can be shared among multiple instances.
 
uint32_t m_target_byte_size = 1
 Making it const would require implementation of move assignment operator.
 

Detailed Description

Definition at line 18 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 22 of file DWARFDataExtractor.h.

Member Function Documentation

◆ GetAsLLVM()

llvm::DataExtractor lldb_private::DWARFDataExtractor::GetAsLLVM ( ) const

◆ GetAsLLVMDWARF()

llvm::DWARFDataExtractor lldb_private::DWARFDataExtractor::GetAsLLVMDWARF ( ) const

◆ 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 30 of file DWARFDataExtractor.h.

◆ GetDWARFSizeOfOffset()

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

Definition at line 31 of file DWARFDataExtractor.h.

Referenced by GetDWARFOffset().


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