LLDB mainline
Public Member Functions | Public Attributes | List of all members
elf::ELFProgramHeader Class Reference

Generic representation of an ELF program header. More...

#include <ELFHeader.h>

Public Member Functions

 ELFProgramHeader ()
 
bool Parse (const lldb_private::DataExtractor &data, lldb::offset_t *offset)
 Parse an ELFProgramHeader entry from the given DataExtractor starting at position offset.
 

Public Attributes

elf_word p_type
 Type of program segment.
 
elf_word p_flags
 Segment attributes.
 
elf_off p_offset
 Start of segment from beginning of file.
 
elf_addr p_vaddr
 Virtual address of segment in memory.
 
elf_addr p_paddr
 Physical address (for non-VM systems).
 
elf_xword p_filesz
 Byte size of the segment in file.
 
elf_xword p_memsz
 Byte size of the segment in memory.
 
elf_xword p_align
 Segment alignment constraint.
 

Detailed Description

Generic representation of an ELF program header.

Definition at line 192 of file ELFHeader.h.

Constructor & Destructor Documentation

◆ ELFProgramHeader()

ELFProgramHeader::ELFProgramHeader ( )

Definition at line 364 of file ELFHeader.cpp.

Member Function Documentation

◆ Parse()

bool ELFProgramHeader::Parse ( const lldb_private::DataExtractor data,
lldb::offset_t offset 
)

Parse an ELFProgramHeader entry from the given DataExtractor starting at position offset.

The address size of the DataExtractor determines if a 32 or 64 bit object is to be parsed.

Parameters
[in]dataThe DataExtractor to read from. The address size of the extractor determines if a 32 or 64 bit object should be read.
[in,out]offsetPointer to an offset in the data. On return the offset will be advanced by the number of bytes read.
Returns
True if the ELFProgramHeader was successfully read and false otherwise.

Definition at line 368 of file ELFHeader.cpp.

References lldb_private::DataExtractor::GetAddressByteSize(), GetMaxU64(), lldb_private::DataExtractor::GetU32(), p_align, p_flags, p_offset, and p_type.

Referenced by ProcessElfCore::FindBuidIdInCoreMemory().

Member Data Documentation

◆ p_align

elf_xword elf::ELFProgramHeader::p_align

Segment alignment constraint.

Definition at line 200 of file ELFHeader.h.

Referenced by ObjectFileELF::CreateSections(), ObjectFileELF::DumpELFProgramHeader(), and Parse().

◆ p_filesz

elf_xword elf::ELFProgramHeader::p_filesz

◆ p_flags

elf_word elf::ELFProgramHeader::p_flags

◆ p_memsz

elf_xword elf::ELFProgramHeader::p_memsz

◆ p_offset

elf_off elf::ELFProgramHeader::p_offset

◆ p_paddr

elf_addr elf::ELFProgramHeader::p_paddr

Physical address (for non-VM systems).

Definition at line 197 of file ELFHeader.h.

Referenced by ObjectFileELF::DumpELFProgramHeader().

◆ p_type

elf_word elf::ELFProgramHeader::p_type

◆ p_vaddr

elf_addr elf::ELFProgramHeader::p_vaddr

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