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

#include <ELFHeader.h>

Collaboration diagram for elf::ELFProgramHeader:
Collaboration graph
[legend]

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. More...
 

Public Attributes

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

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 358 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 362 of file ELFHeader.cpp.

References lldb_private::DataExtractor::GetAddressByteSize(), GetMaxU64(), and lldb_private::DataExtractor::GetU32().

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(), and ObjectFileELF::DumpELFProgramHeader().

◆ p_filesz

elf_xword elf::ELFProgramHeader::p_filesz

◆ p_flags

elf_word elf::ELFProgramHeader::p_flags

◆ p_memsz

elf_xword elf::ELFProgramHeader::p_memsz

Byte size of the segment in memory.

Definition at line 199 of file ELFHeader.h.

Referenced by ProcessElfCore::AddAddressRangeFromLoadSegment(), and ObjectFileELF::DumpELFProgramHeader().

◆ 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

Virtual address of segment in memory.

Definition at line 196 of file ELFHeader.h.

Referenced by ProcessElfCore::AddAddressRangeFromLoadSegment(), and ObjectFileELF::DumpELFProgramHeader().


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