|
LLVM 23.0.0git
|
A DataExtractor subclass that adds GSYM-specific string offset support. More...
#include "llvm/DebugInfo/GSYM/GsymDataExtractor.h"
Public Member Functions | |
| GsymDataExtractor (StringRef Data, bool IsLittleEndian, uint8_t StringOffsetSize=8) | |
| Construct from raw bytes. | |
| GsymDataExtractor (const GsymDataExtractor &Parent, uint64_t Offset, uint64_t Length) | |
| Construct a sub-range extractor from a parent, copying its endianness and string offset size. | |
| uint8_t | getStringOffsetSize () const |
| Get the string offset size in bytes. | |
| uint64_t | getStringOffset (uint64_t *offset_ptr) const |
| Extract a string offset of StringOffsetSize bytes from *offset_ptr. | |
| uint64_t | getStringOffset (Cursor &C) const |
| Extract a string offset of StringOffsetSize bytes from the location given by the cursor. | |
| Public Member Functions inherited from llvm::DataExtractor | |
| DataExtractor (StringRef Data, bool IsLittleEndian) | |
| Construct with a buffer that is owned by the caller. | |
| DataExtractor (ArrayRef< uint8_t > Data, bool IsLittleEndian) | |
| DataExtractor (StringRef Data, bool IsLittleEndian, uint8_t) | |
| DataExtractor (ArrayRef< uint8_t > Data, bool IsLittleEndian, uint8_t) | |
| StringRef | getData () const |
| Get the data pointed to by this extractor. | |
| bool | isLittleEndian () const |
| Get the endianness for this extractor. | |
| const char * | getCStr (uint64_t *OffsetPtr, Error *Err=nullptr) const |
| Extract a C string from *offset_ptr. | |
| const char * | getCStr (Cursor &C) const |
| Extract a C string from the location given by the cursor. | |
| LLVM_ABI StringRef | getCStrRef (uint64_t *OffsetPtr, Error *Err=nullptr) const |
| Extract a C string from *offset_ptr. | |
| StringRef | getCStrRef (Cursor &C) const |
| Extract a C string (as a StringRef) from the location given by the cursor. | |
| LLVM_ABI StringRef | getFixedLengthString (uint64_t *OffsetPtr, uint64_t Length, StringRef TrimChars={"\0", 1}) const |
| Extract a fixed length string from *OffsetPtr and consume Length bytes. | |
| LLVM_ABI StringRef | getBytes (uint64_t *OffsetPtr, uint64_t Length, Error *Err=nullptr) const |
| Extract a fixed number of bytes from the specified offset. | |
| StringRef | getBytes (Cursor &C, uint64_t Length) |
| Extract a fixed number of bytes from the location given by the cursor. | |
| LLVM_ABI uint64_t | getUnsigned (uint64_t *offset_ptr, uint32_t byte_size, Error *Err=nullptr) const |
| Extract an unsigned integer of size byte_size from *offset_ptr. | |
| uint64_t | getUnsigned (Cursor &C, uint32_t Size) const |
| Extract an unsigned integer of the given size from the location given by the cursor. | |
| LLVM_ABI int64_t | getSigned (uint64_t *offset_ptr, uint32_t size) const |
| Extract an signed integer of size byte_size from *offset_ptr. | |
| LLVM_ABI uint8_t | getU8 (uint64_t *offset_ptr, Error *Err=nullptr) const |
| Extract a uint8_t value from *offset_ptr. | |
| uint8_t | getU8 (Cursor &C) const |
| Extract a single uint8_t value from the location given by the cursor. | |
| LLVM_ABI uint8_t * | getU8 (uint64_t *offset_ptr, uint8_t *dst, uint32_t count) const |
| Extract count uint8_t values from *offset_ptr. | |
| LLVM_ABI uint8_t * | getU8 (Cursor &C, uint8_t *Dst, uint32_t Count) const |
| Extract Count uint8_t values from the location given by the cursor and store them into the destination buffer. | |
| void | getU8 (Cursor &C, SmallVectorImpl< uint8_t > &Dst, uint32_t Count) const |
| Extract Count uint8_t values from the location given by the cursor and store them into the destination vector. | |
| int8_t | getS8 (uint64_t *OffsetPtr, Error *Err=nullptr) const |
| Extract a int8_t value from *OffsetPtr. | |
| int8_t | getS8 (Cursor &C) const |
| Extract a int8_t value from *OffsetPtr. | |
| LLVM_ABI uint16_t | getU16 (uint64_t *offset_ptr, Error *Err=nullptr) const |
| Extract a uint16_t value from *offset_ptr. | |
| uint16_t | getU16 (Cursor &C) const |
| Extract a single uint16_t value from the location given by the cursor. | |
| LLVM_ABI uint16_t * | getU16 (uint64_t *offset_ptr, uint16_t *dst, uint32_t count) const |
| Extract count uint16_t values from *offset_ptr. | |
| int16_t | getS16 (uint64_t *OffsetPtr, Error *Err=nullptr) const |
| Extract a int16_t value from *OffsetPtr. | |
| int16_t | getS16 (Cursor &C) const |
| Extract a int16_t value from *OffsetPtr. | |
| LLVM_ABI uint32_t | getU24 (uint64_t *OffsetPtr, Error *Err=nullptr) const |
| Extract a 24-bit unsigned value from *offset_ptr and return it in a uint32_t. | |
| uint32_t | getU24 (Cursor &C) const |
| Extract a single 24-bit unsigned value from the location given by the cursor. | |
| LLVM_ABI uint32_t | getU32 (uint64_t *offset_ptr, Error *Err=nullptr) const |
| Extract a uint32_t value from *offset_ptr. | |
| uint32_t | getU32 (Cursor &C) const |
| Extract a single uint32_t value from the location given by the cursor. | |
| LLVM_ABI uint32_t * | getU32 (uint64_t *offset_ptr, uint32_t *dst, uint32_t count) const |
| Extract count uint32_t values from *offset_ptr. | |
| int32_t | getS32 (uint64_t *OffsetPtr, Error *Err=nullptr) const |
| Extract a int32_t value from *OffsetPtr. | |
| int32_t | getS32 (Cursor &C) const |
| Extract a int32_t value from *OffsetPtr. | |
| LLVM_ABI uint64_t | getU64 (uint64_t *offset_ptr, Error *Err=nullptr) const |
| Extract a uint64_t value from *offset_ptr. | |
| uint64_t | getU64 (Cursor &C) const |
| Extract a single uint64_t value from the location given by the cursor. | |
| LLVM_ABI uint64_t * | getU64 (uint64_t *offset_ptr, uint64_t *dst, uint32_t count) const |
| Extract count uint64_t values from *offset_ptr. | |
| int64_t | getS64 (uint64_t *OffsetPtr, Error *Err=nullptr) const |
| Extract a int64_t value from *OffsetPtr. | |
| int64_t | getS64 (Cursor &C) const |
| Extract a int64_t value from *OffsetPtr. | |
| LLVM_ABI int64_t | getSLEB128 (uint64_t *OffsetPtr, Error *Err=nullptr) const |
| Extract a signed LEB128 value from *offset_ptr. | |
| int64_t | getSLEB128 (Cursor &C) const |
| Extract an signed LEB128 value from the location given by the cursor. | |
| LLVM_ABI uint64_t | getULEB128 (uint64_t *offset_ptr, llvm::Error *Err=nullptr) const |
| Extract a unsigned LEB128 value from *offset_ptr. | |
| uint64_t | getULEB128 (Cursor &C) const |
| Extract an unsigned LEB128 value from the location given by the cursor. | |
| LLVM_ABI void | skip (Cursor &C, uint64_t Length) const |
| Advance the Cursor position by the given number of bytes. | |
| bool | eof (const Cursor &C) const |
| Return true iff the cursor is at the end of the buffer, regardless of the error state of the cursor. | |
| bool | isValidOffset (uint64_t offset) const |
| Test the validity of offset. | |
| bool | isValidOffsetForDataOfSize (uint64_t offset, uint64_t length) const |
| Test the availability of length bytes of data from offset. | |
| size_t | size () const |
| Return the number of bytes in the underlying buffer. | |
Additional Inherited Members | |
| Static Protected Member Functions inherited from llvm::DataExtractor | |
| static uint64_t & | getOffset (Cursor &C) |
| static Error & | getError (Cursor &C) |
A DataExtractor subclass that adds GSYM-specific string offset support.
GSYM files use variable-width string offsets (1-8 bytes). This subclass adds getStringOffsetSize() and getStringOffset() methods to support reading string offsets of the configured size.
Definition at line 22 of file GsymDataExtractor.h.
|
inline |
Construct from raw bytes.
Definition at line 27 of file GsymDataExtractor.h.
References llvm::DataExtractor::DataExtractor().
Referenced by GsymDataExtractor().
|
inline |
Construct a sub-range extractor from a parent, copying its endianness and string offset size.
Definition at line 34 of file GsymDataExtractor.h.
References llvm::DataExtractor::DataExtractor(), llvm::DataExtractor::getData(), getStringOffsetSize(), GsymDataExtractor(), llvm::DataExtractor::isLittleEndian(), llvm::Length, llvm::Offset, and substr().
Extract a string offset of StringOffsetSize bytes from the location given by the cursor.
Definition at line 50 of file GsymDataExtractor.h.
References llvm::CallingConv::C, and llvm::DataExtractor::getUnsigned().
Extract a string offset of StringOffsetSize bytes from *offset_ptr.
Definition at line 44 of file GsymDataExtractor.h.
References llvm::DataExtractor::getUnsigned().
|
inline |
Get the string offset size in bytes.
Definition at line 41 of file GsymDataExtractor.h.
Referenced by GsymDataExtractor().