LLDB mainline
ProcessElfCore::NT_FILE_Entry Struct Reference

Public Member Functions

std::optional< lldb::addr_t > GetLoadAddressForFileOffset (lldb::addr_t file_offset) const
 Convert a file offset for a NT_FILE_Entry into a load address.

Public Attributes

lldb::addr_t start
lldb::addr_t end
lldb::addr_t original_file_offset
 The byte file offset in the original file on disk where this region was copied from when it was loaded into the process.
std::string path

Detailed Description

Definition at line 120 of file ProcessElfCore.h.

Member Function Documentation

◆ GetLoadAddressForFileOffset()

std::optional< lldb::addr_t > ProcessElfCore::NT_FILE_Entry::GetLoadAddressForFileOffset ( lldb::addr_t file_offset) const
inline

Convert a file offset for a NT_FILE_Entry into a load address.

Caution must be used to only use NT_FILE_Entry objects whose path matches the file that you want a load address from since each NT_FILE_Entry has the original file offset for each different file. Use GetNTFileEntriesForMatchingPath(const std::string &path) to get a list of matching file entries before using this method.

Parameters
[in]file_offsetThe file offset within the original file.
Returns
std::nullopt if the file offset isn't in this entry, or a valid load address if it does match.

Definition at line 141 of file ProcessElfCore.h.

References end, original_file_offset, and start.

Member Data Documentation

◆ end

lldb::addr_t ProcessElfCore::NT_FILE_Entry::end

◆ original_file_offset

lldb::addr_t ProcessElfCore::NT_FILE_Entry::original_file_offset

The byte file offset in the original file on disk where this region was copied from when it was loaded into the process.

Definition at line 125 of file ProcessElfCore.h.

Referenced by GetLoadAddressForFileOffset(), and ProcessElfCore::parseLinuxNotes().

◆ path

std::string ProcessElfCore::NT_FILE_Entry::path

Definition at line 126 of file ProcessElfCore.h.

◆ start


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