LLVM 23.0.0git
llvm::gsym::GlobalData Struct Reference

GlobalData describes a section of data in a GSYM file by its type, file offset, and size. More...

#include "llvm/DebugInfo/GSYM/GlobalData.h"

Public Member Functions

LLVM_ABI void encode (FileWriter &O) const
 Encode this GlobalData entry into a FileWriter stream.

Static Public Member Functions

static LLVM_ABI llvm::Expected< GlobalDatadecode (GsymDataExtractor &GsymData, uint64_t &Offset)
 Decode a GlobalData entry from a binary data stream.

Public Attributes

GlobalInfoType Type
uint64_t FileOffset
uint64_t FileSize

Detailed Description

GlobalData describes a section of data in a GSYM file by its type, file offset, and size.

This is used to support 64-bit GSYM files where data sections can be located at arbitrary file offsets.

Definition at line 61 of file GlobalData.h.

Member Function Documentation

◆ decode()

llvm::Expected< GlobalData > GlobalData::decode ( GsymDataExtractor & GsymData,
uint64_t & Offset )
static

Decode a GlobalData entry from a binary data stream.

Parameters
GsymDataThe binary stream to read from.
OffsetThe offset to start reading from. Updated on success.
Returns
A GlobalData entry or an error.

Definition at line 23 of file GlobalData.cpp.

References llvm::createStringError(), FileOffset, FileSize, llvm::DataExtractor::getU32(), llvm::DataExtractor::getU64(), llvm::DataExtractor::isValidOffsetForDataOfSize(), llvm::Offset, and Type.

Referenced by llvm::gsym::GsymReaderV2::dump(), and llvm::gsym::GsymReader::parseGlobalDataEntries().

◆ encode()

void GlobalData::encode ( FileWriter & O) const

Encode this GlobalData entry into a FileWriter stream.

Parameters
OThe binary stream to write the data to.

Definition at line 17 of file GlobalData.cpp.

References FileOffset, FileSize, and Type.

Referenced by llvm::gsym::GsymCreatorV2::encode().

Member Data Documentation

◆ FileOffset

uint64_t llvm::gsym::GlobalData::FileOffset

◆ FileSize

uint64_t llvm::gsym::GlobalData::FileSize

◆ Type

GlobalInfoType llvm::gsym::GlobalData::Type

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