A DataExtractor suitable use for parsing dwarf from memory. Clients use Relocator::getRelocatedValueImpl to relocate values as appropriate.

Synopsis

Declared in <llvm/DebugInfo/DWARF/LowLevel/DWARFDataExtractorSimple.h>

template<typename Relocator>
class DWARFDataExtractorBase
    : public DataExtractor

Base Classes

Name

Description

DataExtractor

Helper for extracting integers and strings from a binary buffer.

Types

Name

Description

Cursor

Position in a DataExtractor together with any extraction error.

Member Functions

Name

Description

DWARFDataExtractorBase [constructor]

Constructors

eof

Return true if the cursor is at the end of the buffer.

getAddress

getAddress overloads

getAddressSize

Get the address size for this extractor.

getBytes

getBytes overloads

getCStr

getCStr overloads

getCStrRef

getCStrRef overloads

getData

Get the data pointed to by this extractor.

getEncodedPointer

Extract a DWARF‐encoded pointer at Offset using Encoding.

getFixedLengthString

Extract a fixed length string from *OffsetPtr and consume Length bytes.

getInitialLength

getInitialLength overloads

getRelocatedAddress

getRelocatedAddress overloads

getRelocatedValue

getRelocatedValue overloads

getS16

getS16 overloads

getS32

getS32 overloads

getS64

getS64 overloads

getS8

getS8 overloads

getSLEB128

getSLEB128 overloads

getSigned

Extract an signed integer of size byte_size from *offset_ptr.

getU16

getU16 overloads

getU24

getU24 overloads

getU32

getU32 overloads

getU64

getU64 overloads

getU8

getU8 overloads

getULEB128

getULEB128 overloads

getUnsigned

getUnsigned overloads

isLittleEndian

Get the endianness for this extractor.

isValidOffset

Test the validity of offset.

isValidOffsetForAddress

Test the availability of enough bytes of data for an address from Offset. The size of an address is getAddressSize().

isValidOffsetForDataOfSize

Test the availability of length bytes of data from offset.

setAddressSize

Set the address size for this extractor.

size

Return the number of bytes in the underlying buffer.

skip

Advance the Cursor position by the given number of bytes. No‐op if the cursor is in an error state.

Protected Static Member Functions

Name

Description

getError

Access the mutable error state of cursor C.

getOffset

Access the mutable extraction offset of cursor C.

Non-Member Functions

Name

Description

readAbbrevAttribute

Read the next attribute/form spec from an abbreviation declaration.

xray::loadTrace

This function will attempt to load XRay trace records from the provided DataExtractor.

xray::readBinaryFormatHeader

Convenience function for loading the file header given a data extractor at a specified offset.

Derived Classes

Name

Description

DWARFDataExtractor

A DWARFDataExtractor (typically for an in‐memory copy of an object‐file section) plus a relocation map for that section, if there is one.

DWARFDataExtractorSimple

Non‐relocating DWARF data extractor for memory‐backed debug info.

Created with MrDocs