[Go to site: main page, start]

LLDB mainline
DynamicLoader.cpp
Go to the documentation of this file.
1//===-- DynamicLoader.cpp -------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10
11#include "lldb/Core/Debugger.h"
12#include "lldb/Core/Module.h"
16#include "lldb/Core/Section.h"
21#include "lldb/Target/Process.h"
22#include "lldb/Target/Target.h"
25#include "lldb/Utility/Log.h"
27
28#include "llvm/ADT/STLExtras.h"
29#include "llvm/ADT/SmallVector.h"
30#include "llvm/ADT/StringRef.h"
31#include "llvm/Support/Error.h"
32
33#include <memory>
34#include <optional>
35#include <string>
36
37#include <cassert>
38
39using namespace lldb;
40using namespace lldb_private;
41
43 llvm::StringRef plugin_name) {
44 DynamicLoaderCreateInstance create_callback = nullptr;
45 if (!plugin_name.empty()) {
46 create_callback =
48 if (create_callback) {
49 std::unique_ptr<DynamicLoader> instance_up(
50 create_callback(process, true));
51 if (instance_up)
52 return instance_up.release();
53 }
54 } else {
55 for (auto create_callback :
57 std::unique_ptr<DynamicLoader> instance_up(
58 create_callback(process, false));
59 if (instance_up)
60 return instance_up.release();
61 }
62 }
63 return nullptr;
64}
65
67
68// Accessors to the global setting as to whether to stop at image (shared
69// library) loading/unloading.
70
72 return m_process->GetStopOnSharedLibraryEvents();
73}
74
76 m_process->SetStopOnSharedLibraryEvents(stop);
77}
78
80 Target &target = m_process->GetTarget();
81 ModuleSP executable = target.GetExecutableModule();
82
83 if (executable) {
84 if (FileSystem::Instance().Exists(executable->GetFileSpec())) {
85 ModuleSpec module_spec(executable->GetFileSpec(),
86 executable->GetArchitecture());
87 auto module_sp = std::make_shared<Module>(module_spec);
88 // If we're a coredump and we already have a main executable, we don't
89 // need to reload the module list that target already has
90 if (!m_process->IsLiveDebugSession()) {
91 return executable;
92 }
93 // Check if the executable has changed and set it to the target
94 // executable if they differ.
95 if (module_sp && module_sp->GetUUID().IsValid() &&
96 executable->GetUUID().IsValid()) {
97 if (module_sp->GetUUID() != executable->GetUUID())
98 executable.reset();
99 } else if (executable->FileHasChanged()) {
100 executable.reset();
101 }
102
103 if (!executable) {
104 executable = target.GetOrCreateModule(module_spec, true /* notify */);
105 if (executable.get() != target.GetExecutableModulePointer()) {
106 // Don't load dependent images since we are in dyld where we will
107 // know and find out about all images that are loaded
108 target.SetExecutableModule(executable, eLoadDependentsNo);
109 }
110 }
111 }
112 }
113 return executable;
114}
115
117 addr_t base_addr,
118 bool base_addr_is_offset) {
119 UpdateLoadedSectionsCommon(module, base_addr, base_addr_is_offset);
120}
121
123 addr_t base_addr,
124 bool base_addr_is_offset) {
125 bool changed;
126 module->SetLoadAddress(m_process->GetTarget(), base_addr, base_addr_is_offset,
127 changed);
128}
129
131 UnloadSectionsCommon(module);
132}
133
135 Target &target = m_process->GetTarget();
136 const SectionList *sections = GetSectionListFromModule(module);
137
138 assert(sections && "SectionList missing from unloaded module.");
139
140 const size_t num_sections = sections->GetSize();
141 for (size_t i = 0; i < num_sections; ++i) {
142 SectionSP section_sp(sections->GetSectionAtIndex(i));
143 target.SetSectionUnloaded(section_sp);
144 }
145}
146
147const SectionList *
149 SectionList *sections = nullptr;
150 if (module) {
151 ObjectFile *obj_file = module->GetObjectFile();
152 if (obj_file != nullptr) {
153 sections = obj_file->GetSectionList();
154 }
155 }
156 return sections;
157}
158
160 ModuleSpec module_spec(spec);
161 Target &target = m_process->GetTarget();
162 // The process may be able to augment the module_spec with a UUID.
163 if (!module_spec.GetUUID().IsValid())
164 m_process->FindModuleUUID(module_spec);
165 if (ModuleSP module_sp = target.GetImages().FindFirstModule(module_spec))
166 return module_sp;
167
168 if (ModuleSP module_sp =
169 target.GetOrCreateModule(module_spec, /*notify=*/false))
170 return module_sp;
171
172 return nullptr;
173}
174
176 addr_t link_map_addr,
177 addr_t base_addr,
178 bool base_addr_is_offset) {
179 Target &target = m_process->GetTarget();
180 ModuleSpec module_spec(file, target.GetArchitecture());
181 module_spec.SetLoadAddress(base_addr);
182 ModuleSP module_sp = FindModuleViaTarget(module_spec);
183 // We have a core file, try to load the image from memory if we didn't find
184 // the module.
185 if (!module_sp && !m_process->IsLiveDebugSession()) {
186 llvm::Expected<ModuleSP> memory_module_sp_or_err =
187 m_process->ReadModuleFromMemory(file, base_addr);
188 if (auto err = memory_module_sp_or_err.takeError())
190 "Failed to read module from memory: {0}");
191 else {
192 module_sp = *memory_module_sp_or_err;
193 m_process->GetTarget().GetImages().AppendIfNeeded(module_sp, false);
194 }
195 }
196 if (module_sp)
197 UpdateLoadedSections(module_sp, link_map_addr, base_addr,
198 base_addr_is_offset);
199 return module_sp;
200}
201
203 llvm::StringRef name) {
204 char namebuf[80];
205 if (name.empty()) {
206 snprintf(namebuf, sizeof(namebuf), "memory-image-0x%" PRIx64, addr);
207 name = namebuf;
208 }
209 llvm::Expected<ModuleSP> module_sp_or_err =
210 process->ReadModuleFromMemory(FileSpec(name), addr);
211 if (auto err = module_sp_or_err.takeError()) {
213 "Failed to read module from memory: {0}");
214 return {};
215 }
216 return *module_sp_or_err;
217}
218
219static std::string
221 StreamString desc;
222 if (!bin_spec.name.empty())
223 desc << bin_spec.name << " ";
224 if (bin_spec.uuid.IsValid())
225 desc << bin_spec.uuid.GetAsString();
226 if (!bin_spec.value_is_offset && bin_spec.value != LLDB_INVALID_ADDRESS) {
227 desc << " at 0x";
228 desc.PutHex64(bin_spec.value);
229 }
230 return desc.GetString().str();
231}
232
233static std::string
235 StreamString msg;
236 msg << "Unable to find file";
237 if (!bin_spec.name.empty())
238 msg << " " << bin_spec.name;
239 if (bin_spec.uuid.IsValid())
240 msg << " with UUID " << bin_spec.uuid.GetAsString();
241 if (bin_spec.value != LLDB_INVALID_ADDRESS) {
242 if (bin_spec.value_is_offset)
243 msg.Printf(" with slide 0x%" PRIx64, bin_spec.value);
244 else
245 msg.Printf(" at address 0x%" PRIx64, bin_spec.value);
246 }
247 return msg.GetString().str();
248}
249
250/// Reads the Target, so it has to be called for one binary at a time.
251///
252/// \return What to search for, or nothing when the binary is already in hand.
253static std::optional<SymbolLocator::Request>
255 ModuleSpec module_spec;
256 module_spec.SetTarget(target.shared_from_this());
257 module_spec.GetUUID() = bin_spec.uuid;
258 FileSpec name_filespec(bin_spec.name);
259 if (FileSystem::Instance().Exists(name_filespec))
260 module_spec.GetFileSpec() = name_filespec;
261
262 // Has lldb already seen a module with this UUID? A module whose symbols are
263 // already in hand is the answer, and searching would only find them again.
264 // Without them the search still has something to add.
265 ModuleList::GetSharedModule(module_spec, bin_spec.module_sp, nullptr, nullptr,
266 /*invoke_locate_callback=*/true,
267 /*invoke_symbol_locators=*/false);
268 if (bin_spec.module_sp && bin_spec.module_sp->GetSymbolFileFileSpec())
269 return std::nullopt;
270
272 request.module_spec = module_spec;
273 request.platform = target.GetPlatform();
274 request.external_lookup = bin_spec.force_symbol_search;
275 request.description = GetBinaryDescription(bin_spec);
276 return request;
277}
278
279/// The module is not registered with the Target until LoadBinaryInTarget.
281 llvm::Expected<SymbolLocator::Result> located) {
282 if (!located) {
283 // Loading a binary that was never found already reports that, so a bare
284 // not-found error would only say it a second time. Any other error says
285 // something that report cannot.
286 llvm::Error error = located.takeError();
288 llvm::consumeError(std::move(error));
289 else
290 bin_spec.error = Status::FromError(std::move(error));
291 return;
292 }
293
294 if (located->symbol_error)
295 bin_spec.error = Status::FromError(std::move(*located->symbol_error));
296
297 ModuleSP located_module_sp;
298 ModuleList::GetSharedModule(located->module_spec, located_module_sp, nullptr,
299 nullptr, /*invoke_locate_callback=*/false,
300 /*invoke_symbol_locators=*/false);
301
302 // A located binary always yields a module, whatever ObjectFile makes of the
303 // file, because the caller has nowhere else to record what the search found.
304 if (!located_module_sp)
305 located_module_sp = std::make_shared<Module>(located->module_spec);
306
307 // Published only now, so that a search that came up empty leaves whatever the
308 // shared module list had in hand.
309 bin_spec.module_sp = std::move(located_module_sp);
310 bin_spec.module_sp->GetSymbolLocatorStatistics().merge(located->statistics);
311}
312
313static void FindBinaryUUIDInMemory(Process *process,
314 DynamicLoader::BinarySpec &bin_spec) {
315 bin_spec.memory_module_sp =
316 ReadUnnamedMemoryModule(process, bin_spec.value, bin_spec.name);
317 if (bin_spec.memory_module_sp)
318 bin_spec.uuid = bin_spec.memory_module_sp->GetUUID();
319}
320
322 Process *process, llvm::MutableArrayRef<BinarySpec> bin_specs) {
323 Target &target = process->GetTarget();
325
326 // Reading a binary's UUID out of memory has to happen on this thread, and
327 // before any search, so that a binary whose UUID is not known yet still joins
328 // the batch.
329 llvm::SmallVector<BinarySpec *> to_search;
330 std::vector<SymbolLocator::Request> requests;
331 for (BinarySpec &bin_spec : bin_specs) {
332 if (!bin_spec.uuid.IsValid() && !bin_spec.value_is_offset)
333 FindBinaryUUIDInMemory(process, bin_spec);
334 if (!bin_spec.uuid.IsValid())
335 continue;
336 if (std::optional<SymbolLocator::Request> request =
337 PrepareSearch(target, bin_spec)) {
338 to_search.push_back(&bin_spec);
339 requests.push_back(std::move(*request));
340 }
341 }
342
343 std::vector<llvm::Expected<SymbolLocator::Result>> located =
344 SymbolLocator::Locate(requests, search_paths,
345 target.GetParallelModuleLoad());
346
347 for (auto [bin_spec, result] : llvm::zip_equal(to_search, located))
348 FinishSearch(*bin_spec, std::move(result));
349}
350
351llvm::Expected<ModuleSP>
353 Target &target = process->GetTarget();
354
355 // The error belongs to this function now: every path below either reports it
356 // or folds it into the failure.
357 llvm::Error search_error = bin_spec.error.takeError();
358
359 // If we couldn't find the binary anywhere else, as a last resort,
360 // read it out of memory.
361 if (bin_spec.allow_memory_image_last_resort && !bin_spec.module_sp &&
362 bin_spec.value != LLDB_INVALID_ADDRESS && !bin_spec.value_is_offset) {
363 if (!bin_spec.memory_module_sp)
364 bin_spec.memory_module_sp =
365 ReadUnnamedMemoryModule(process, bin_spec.value, bin_spec.name);
366 if (bin_spec.memory_module_sp)
367 bin_spec.module_sp = bin_spec.memory_module_sp;
368 }
369
371 if (!bin_spec.module_sp) {
372 std::string message = GetBinaryNotFoundMessage(bin_spec);
373 LLDB_LOG(log, "{0}", message);
374 llvm::Error error = llvm::createStringError(message);
375 if (search_error)
376 return llvm::joinErrors(std::move(search_error), std::move(error));
377 return std::move(error);
378 }
379
380 // A binary was found, but a symbol server may still have had something to say
381 // about its symbols. Name the binary: a symbol locator's error is not
382 // required to identify what it was asked to look for.
383 if (search_error)
385 << GetBinaryDescription(bin_spec) << ": "
386 << llvm::toString(std::move(search_error)) << "\n";
387
388 // Ensure the Target has an architecture set in case
389 // we need it while processing this binary/eh_frame/debug info.
390 if (!target.GetArchitecture().IsValid())
391 target.SetArchitecture(bin_spec.module_sp->GetArchitecture());
392 target.GetImages().AppendIfNeeded(bin_spec.module_sp, false);
393
394 bool changed = false;
395 if (bin_spec.set_address_in_target) {
396 if (bin_spec.module_sp->GetObjectFile()) {
397 if (bin_spec.value != LLDB_INVALID_ADDRESS) {
398 LLDB_LOGF(log,
399 "DynamicLoader::LoadBinaryInTarget Loading "
400 "binary %s UUID %s at %s 0x%" PRIx64,
401 bin_spec.name.c_str(), bin_spec.uuid.GetAsString().c_str(),
402 bin_spec.value_is_offset ? "offset" : "address",
403 bin_spec.value);
404 bin_spec.module_sp->SetLoadAddress(target, bin_spec.value,
405 bin_spec.value_is_offset, changed);
406 } else {
407 // No address/offset/slide, load the binary at file address,
408 // offset 0.
409 LLDB_LOGF(log,
410 "DynamicLoader::LoadBinaryInTarget Loading "
411 "binary %s UUID %s at file address",
412 bin_spec.name.c_str(), bin_spec.uuid.GetAsString().c_str());
413 bin_spec.module_sp->SetLoadAddress(target, 0, true /* value_is_slide */,
414 changed);
415 }
416 } else {
417 // In-memory image, load at its true address, offset 0.
418 LLDB_LOGF(log,
419 "DynamicLoader::LoadBinaryInTarget Loading binary "
420 "%s UUID %s from memory at address 0x%" PRIx64,
421 bin_spec.name.c_str(), bin_spec.uuid.GetAsString().c_str(),
422 bin_spec.value);
423 bin_spec.module_sp->SetLoadAddress(target, 0, true /* value_is_slide */,
424 changed);
425 }
426 }
427
428 if (bin_spec.notify) {
429 ModuleList added_module;
430 added_module.Append(bin_spec.module_sp, false);
431 target.ModulesDidLoad(added_module);
432 }
433
434 return bin_spec.module_sp;
435}
436
437llvm::Expected<ModuleSP>
439 LocateBinaries(process, bin_spec);
440 return LoadBinaryInTarget(process, bin_spec);
441}
442
444 int size_in_bytes) {
446 uint64_t value =
447 m_process->ReadUnsignedIntegerFromMemory(addr, size_in_bytes, 0, error);
448 if (error.Fail())
449 return -1;
450 else
451 return (int64_t)value;
452}
453
456 addr_t value = m_process->ReadPointerFromMemory(addr, error);
457 if (error.Fail())
459 else
460 return value;
461}
462
464{
465 if (m_process)
466 m_process->LoadOperatingSystemPlugin(flush);
467}
static llvm::raw_ostream & error(Stream &strm)
static void FinishSearch(DynamicLoader::BinarySpec &bin_spec, llvm::Expected< SymbolLocator::Result > located)
The module is not registered with the Target until LoadBinaryInTarget.
static ModuleSP ReadUnnamedMemoryModule(Process *process, addr_t addr, llvm::StringRef name)
static void FindBinaryUUIDInMemory(Process *process, DynamicLoader::BinarySpec &bin_spec)
static std::string GetBinaryDescription(const DynamicLoader::BinarySpec &bin_spec)
static std::string GetBinaryNotFoundMessage(const DynamicLoader::BinarySpec &bin_spec)
static std::optional< SymbolLocator::Request > PrepareSearch(Target &target, DynamicLoader::BinarySpec &bin_spec)
Reads the Target, so it has to be called for one binary at a time.
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
Definition Log.h:375
#define LLDB_LOGF(log,...)
Definition Log.h:389
#define LLDB_LOG_ERROR(log, error,...)
Definition Log.h:405
bool IsValid() const
Tests if this ArchSpec is valid.
Definition ArchSpec.h:452
lldb::StreamUP GetAsyncErrorStream()
void LoadOperatingSystemPlugin(bool flush)
void SetStopWhenImagesChange(bool stop)
Set whether the process should stop when images change.
lldb::ModuleSP FindModuleViaTarget(const ModuleSpec &module_spec)
Find a module in the target that matches the given module spec.
int64_t ReadUnsignedIntWithSizeInBytes(lldb::addr_t addr, int size_in_bytes)
static llvm::Expected< lldb::ModuleSP > LocateAndLoadBinary(Process *process, BinarySpec &bin_spec)
Find a binary and load it into a Target.
lldb::addr_t ReadPointer(lldb::addr_t addr)
Process * m_process
The process that this dynamic loader plug-in is tracking.
void UpdateLoadedSectionsCommon(lldb::ModuleSP module, lldb::addr_t base_addr, bool base_addr_is_offset)
lldb::ModuleSP GetTargetExecutable()
Checks to see if the target module has changed, updates the target accordingly and returns the target...
bool GetStopWhenImagesChange() const
Get whether the process should stop when images change.
static void LocateBinaries(Process *process, llvm::MutableArrayRef< BinarySpec > bin_specs)
Search for a batch of binaries, without mutating the Target.
virtual lldb::ModuleSP LoadModuleAtAddress(const lldb_private::FileSpec &file, lldb::addr_t link_map_addr, lldb::addr_t base_addr, bool base_addr_is_offset)
Locates or creates a module given by file and updates/loads the resulting module at the virtual base ...
virtual void UpdateLoadedSections(lldb::ModuleSP module, lldb::addr_t link_map_addr, lldb::addr_t base_addr, bool base_addr_is_offset)
Updates the load address of every allocatable section in module.
DynamicLoader(Process *process)
Construct with a process.
const lldb_private::SectionList * GetSectionListFromModule(const lldb::ModuleSP module) const
static DynamicLoader * FindPlugin(Process *process, llvm::StringRef plugin_name)
Find a dynamic loader plugin for a given process.
static llvm::Expected< lldb::ModuleSP > LoadBinaryInTarget(Process *process, BinarySpec &bin_spec)
Add a binary that LocateBinaries searched for to the Target, and set its load address.
void UnloadSectionsCommon(const lldb::ModuleSP module)
virtual void UnloadSections(const lldb::ModuleSP module)
Removes the loaded sections from the target in module.
A file collection class.
A file utility class.
Definition FileSpec.h:56
static FileSystem & Instance()
A collection class for Module objects.
Definition ModuleList.h:125
static Status GetSharedModule(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr, bool invoke_locate_callback=true, bool invoke_symbol_locators=true)
lldb::ModuleSP FindFirstModule(const ModuleSpec &module_spec) const
Finds the first module whose file specification matches module_spec.
bool AppendIfNeeded(const lldb::ModuleSP &new_module, bool notify=true)
Append a module to the module list, if it is not already there.
void Append(const lldb::ModuleSP &module_sp, bool notify=true)
Append a module to the module list.
void SetLoadAddress(lldb::addr_t addr)
Set the load address of a module in process memory.
Definition ModuleSpec.h:126
FileSpec & GetFileSpec()
Definition ModuleSpec.h:57
void SetTarget(lldb::TargetSP target)
Set the target to be used when resolving a module.
Definition ModuleSpec.h:150
A plug-in interface definition class for object file parsers.
Definition ObjectFile.h:46
virtual SectionList * GetSectionList(bool update_module_section_list=true)
Gets the section list for the currently selected architecture (and object for archives).
static DynamicLoaderCreateInstance GetDynamicLoaderCreateCallbackForPluginName(llvm::StringRef name)
static llvm::SmallVector< DynamicLoaderCreateInstance > GetDynamicLoaderCreateCallbacks()
A plug-in interface definition class for debugging a process.
Definition Process.h:359
llvm::Expected< lldb::ModuleSP > ReadModuleFromMemory(const FileSpec &file_spec, lldb::addr_t header_addr, size_t size_to_read=512)
Creates and populates a module using an in-memory object file.
Definition Process.cpp:2793
Target & GetTarget()
Get the target object pointer for this module.
Definition Process.h:1258
size_t GetSize() const
Definition Section.h:77
lldb::SectionSP GetSectionAtIndex(size_t idx) const
Definition Section.cpp:555
An error handling class.
Definition Status.h:118
llvm::Error takeError()
Definition Status.h:170
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
Definition Status.cpp:136
llvm::StringRef GetString() const
size_t PutHex64(uint64_t uvalue, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
Definition Stream.cpp:307
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition Stream.cpp:134
A binary was not found and nothing could say why.
static llvm::Expected< Result > Locate(const Request &request, const FileSpecList &search_paths)
Find a binary and, if possible, its symbols.
void ModulesDidLoad(ModuleList &module_list)
This call may preload module symbols, and may do so in parallel depending on the following target set...
Definition Target.cpp:1940
Module * GetExecutableModulePointer()
Definition Target.cpp:1640
Debugger & GetDebugger() const
Definition Target.h:1330
bool SetSectionUnloaded(const lldb::SectionSP &section_sp)
Definition Target.cpp:3551
lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec, bool notify, Status *error_ptr=nullptr)
Find a binary on the system and return its Module, or return an existing Module that is already in th...
Definition Target.cpp:2449
bool SetArchitecture(const ArchSpec &arch_spec, bool set_platform=false, bool merge=true)
Set the architecture for this target.
Definition Target.cpp:1786
lldb::ModuleSP GetExecutableModule()
Gets the module for the main executable.
Definition Target.cpp:1624
static FileSpecList GetDefaultDebugFileSearchPaths()
Definition Target.cpp:2901
lldb::PlatformSP GetPlatform()
Definition Target.h:1973
const ModuleList & GetImages() const
Get accessor for the images for this process.
Definition Target.h:1247
const ArchSpec & GetArchitecture() const
Definition Target.h:1289
void SetExecutableModule(lldb::ModuleSP &module_sp, LoadDependentFiles load_dependent_files=eLoadDependentsDefault)
Set the main executable module.
Definition Target.cpp:1657
std::string GetAsString(llvm::StringRef separator="-") const
Definition UUID.cpp:54
bool IsValid() const
Definition UUID.h:69
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition Log.h:338
DynamicLoader *(* DynamicLoaderCreateInstance)(Process *process, bool force)
std::shared_ptr< lldb_private::Section > SectionSP
uint64_t addr_t
Definition lldb-types.h:80
std::shared_ptr< lldb_private::Module > ModuleSP
A binary to find and load into a Target.
lldb::addr_t value
Address where the binary should be loaded, or read out of memory.
bool allow_memory_image_last_resort
If no better binary image can be found, allow reading the binary out of memory, if possible,...
UUID uuid
UUID of the binary to be loaded.
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 secon...
std::string name
Name of the binary, if available.
lldb::ModuleSP module_sp
The module found for the binary, or empty if it was not found.
Status error
What an external symbol server had to say about this binary.
bool force_symbol_search
Allow the search to do a possibly expensive external search for the ObjectFile and/or SymbolFile.
bool set_address_in_target
Whether the address of the binary should be set in the Target if it is added.
bool notify
Whether ModulesDidLoad should be called once the binary has been added to the Target.
bool value_is_offset
A flag indicating that value is an address, or an offset to be applied to the file addresses.
One binary to search for.
lldb::PlatformSP platform
A platform that may know where the binary is.
std::string description
How to name this binary in a progress report.
ModuleSpec module_spec
What to look for.
bool external_lookup
Allow contacting an external symbol server when the local searches come up empty.