LLDB mainline
lldb_private::DynamicLoader::BinarySpec Struct Reference

A binary to find and load into a Target. More...

#include <DynamicLoader.h>

Public Attributes

std::string name
 Name of the binary, if available.
UUID uuid
 UUID of the binary to be loaded.
lldb::addr_t value = LLDB_INVALID_ADDRESS
 Address where the binary should be loaded, or read out of memory.
bool value_is_offset = false
 A flag indicating that value is an address, or an offset to be applied to the file addresses.
bool force_symbol_search = false
 Allow the search to do a possibly expensive external search for the ObjectFile and/or SymbolFile.
bool notify = false
 Whether ModulesDidLoad should be called once the binary has been added to the Target.
bool set_address_in_target = false
 Whether the address of the binary should be set in the Target if it is added.
bool allow_memory_image_last_resort = false
 If no better binary image can be found, allow reading the binary out of memory, if possible, and create the Module based on that.
lldb::ModuleSP module_sp
 The module found for the binary, or empty if it was not found.
lldb::ModuleSP memory_module_sp
 The binary as it was read out of the process' memory, if it had to be, so that it is not read a second time.
Status error
 What an external symbol server had to say about this binary.

Detailed Description

A binary to find and load into a Target.

The leading fields are inputs, filled in by the caller. The trailing fields are outputs: searching for the binary records its results in them, and loading the binary into the Target consumes them.

Definition at line 224 of file DynamicLoader.h.

Member Data Documentation

◆ allow_memory_image_last_resort

bool lldb_private::DynamicLoader::BinarySpec::allow_memory_image_last_resort = false

If no better binary image can be found, allow reading the binary out of memory, if possible, and create the Module based on that.

May be slow to read a binary out of memory, and for unusual environments, there may be no symbols mapped in memory at all.

Definition at line 264 of file DynamicLoader.h.

Referenced by lldb_private::DynamicLoader::LoadBinaryInTarget(), and ObjectFileMachO::LoadCoreFileImages().

◆ error

Status lldb_private::DynamicLoader::BinarySpec::error

What an external symbol server had to say about this binary.

The search records it rather than reporting it, so that it reaches the user in the caller's order.

Definition at line 277 of file DynamicLoader.h.

Referenced by FinishSearch(), and lldb_private::DynamicLoader::LoadBinaryInTarget().

◆ force_symbol_search

bool lldb_private::DynamicLoader::BinarySpec::force_symbol_search = false

◆ memory_module_sp

lldb::ModuleSP lldb_private::DynamicLoader::BinarySpec::memory_module_sp

The binary as it was read out of the process' memory, if it had to be, so that it is not read a second time.

Definition at line 272 of file DynamicLoader.h.

Referenced by FindBinaryUUIDInMemory(), and lldb_private::DynamicLoader::LoadBinaryInTarget().

◆ module_sp

lldb::ModuleSP lldb_private::DynamicLoader::BinarySpec::module_sp

The module found for the binary, or empty if it was not found.

It is not registered with the Target until LoadBinaryInTarget.

Definition at line 268 of file DynamicLoader.h.

Referenced by FinishSearch(), lldb_private::DynamicLoader::LoadBinaryInTarget(), and PrepareSearch().

◆ name

std::string lldb_private::DynamicLoader::BinarySpec::name

Name of the binary, if available.

If no matching binary can be found on the debug host, a module may be created out of live memory and given this name. If empty, a name is constructed from the address the binary is loaded at.

Definition at line 229 of file DynamicLoader.h.

Referenced by FindBinaryUUIDInMemory(), GetBinaryDescription(), GetBinaryNotFoundMessage(), lldb_private::DynamicLoader::LoadBinaryInTarget(), ObjectFileMachO::LoadCoreFileImages(), and PrepareSearch().

◆ notify

bool lldb_private::DynamicLoader::BinarySpec::notify = false

Whether ModulesDidLoad should be called once the binary has been added to the Target.

A caller loading several binaries may prefer to batch those up.

Definition at line 252 of file DynamicLoader.h.

Referenced by ProcessMachCore::LoadBinariesViaMetadata(), lldb_private::DynamicLoader::LoadBinaryInTarget(), ProcessMachCore::LoadBinaryViaLowmemUUID(), ObjectFileMachO::LoadCoreFileImages(), and lldb_private::process_gdb_remote::ProcessGDBRemote::LoadStubBinaries().

◆ set_address_in_target

bool lldb_private::DynamicLoader::BinarySpec::set_address_in_target = false

Whether the address of the binary should be set in the Target if it is added.

A caller that wants to set the section addresses individually leaves this false, and is then responsible for setting the load address for the binary or its segments in the Target.

Definition at line 258 of file DynamicLoader.h.

Referenced by ProcessMachCore::LoadBinariesViaMetadata(), lldb_private::DynamicLoader::LoadBinaryInTarget(), ProcessMachCore::LoadBinaryViaLowmemUUID(), ObjectFileMachO::LoadCoreFileImages(), and lldb_private::process_gdb_remote::ProcessGDBRemote::LoadStubBinaries().

◆ uuid

UUID lldb_private::DynamicLoader::BinarySpec::uuid

UUID of the binary to be loaded.

May be empty, in which case, if a load address is supplied, the binary is read out of memory to get a UUID to look for. There is a performance cost to doing this, it is not preferable.

Definition at line 235 of file DynamicLoader.h.

Referenced by FindBinaryUUIDInMemory(), GetBinaryDescription(), GetBinaryNotFoundMessage(), ProcessMachCore::LoadBinariesViaMetadata(), lldb_private::DynamicLoader::LoadBinaryInTarget(), ProcessMachCore::LoadBinaryViaLowmemUUID(), ObjectFileMachO::LoadCoreFileImages(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadStubBinaries(), and PrepareSearch().

◆ value

◆ value_is_offset

bool lldb_private::DynamicLoader::BinarySpec::value_is_offset = false

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