LLDB mainline
ModuleList.h
Go to the documentation of this file.
1//===-- ModuleList.h --------------------------------------------*- C++ -*-===//
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
9#ifndef LLDB_CORE_MODULELIST_H
10#define LLDB_CORE_MODULELIST_H
11
12#include "lldb/Core/Address.h"
17#include "lldb/Utility/Status.h"
19#include "lldb/lldb-forward.h"
21#include "lldb/lldb-types.h"
22
23#include "llvm/ADT/DenseSet.h"
24#include "llvm/Support/RWMutex.h"
25
26#include <functional>
27#include <list>
28#include <mutex>
29#include <vector>
30
31#include <cstddef>
32#include <cstdint>
33
34namespace lldb_private {
35class ConstString;
36class FileSpecList;
37class Function;
38class Log;
39class Module;
41class Stream;
42class SymbolContext;
44class SymbolFile;
45class Target;
46class TypeList;
47class UUID;
48class VariableList;
50
52 {
54 "off",
55 "Disable automatically downloading symbols.",
56 },
57 {
59 "background",
60 "Download symbols in the background for images as they appear in the "
61 "backtrace.",
62 },
63 {
65 "foreground",
66 "Download symbols in the foreground for images as they appear in the "
67 "backtrace.",
68 },
69};
70
72 {
74 "host-lldb-memory",
75 "Get binaries from the host lldb in-memory shared cache.",
76 },
77 {
79 "host-shared-cache",
80 "Get binaries from the host shared cache.",
81 },
82 {
84 "host-and-inferior-shared-cache",
85 "Get binaries from the host and inferior's shared caches.",
86 },
87 {
89 "inferior-shared-cache-only",
90 "Get binaries from inferior's shared cache only.",
91 },
92};
93
119
120/// \class ModuleList ModuleList.h "lldb/Core/ModuleList.h"
121/// A collection class for Module objects.
122///
123/// Modules in the module collection class are stored as reference counted
124/// shared pointers to Module objects.
126public:
127 class Notifier {
128 public:
129 virtual ~Notifier() = default;
130
131 virtual void NotifyModuleAdded(const ModuleList &module_list,
132 const lldb::ModuleSP &module_sp) = 0;
133 virtual void NotifyModuleRemoved(const ModuleList &module_list,
134 const lldb::ModuleSP &module_sp) = 0;
135 virtual void NotifyModuleUpdated(const ModuleList &module_list,
136 const lldb::ModuleSP &old_module_sp,
137 const lldb::ModuleSP &new_module_sp) = 0;
138 virtual void NotifyWillClearList(const ModuleList &module_list) = 0;
139
140 virtual void NotifyModulesRemoved(lldb_private::ModuleList &module_list) = 0;
141 };
142
143 /// Default constructor.
144 ///
145 /// Creates an empty list of Module objects.
146 ModuleList();
147
148 /// Copy Constructor.
149 ///
150 /// Creates a new module list object with a copy of the modules from \a rhs.
151 ///
152 /// \param[in] rhs
153 /// Another module list object.
154 ModuleList(const ModuleList &rhs);
155
157
158 /// Destructor.
160
161 /// Assignment operator.
162 ///
163 /// Copies the module list from \a rhs into this list.
164 ///
165 /// \param[in] rhs
166 /// Another module list object.
167 ///
168 /// \return
169 /// A const reference to this object.
170 const ModuleList &operator=(const ModuleList &rhs);
171
172 /// Append a module to the module list.
173 ///
174 /// \param[in] module_sp
175 /// A shared pointer to a module to add to this collection.
176 ///
177 /// \param[in] notify
178 /// If true, and a notifier function is set, the notifier function
179 /// will be called. Defaults to true.
180 ///
181 /// When this ModuleList is the Target's ModuleList, the notifier
182 /// function is Target::ModulesDidLoad -- the call to
183 /// ModulesDidLoad may be deferred when adding multiple Modules
184 /// to the Target, but it must be called at the end,
185 /// before resuming execution.
186 void Append(const lldb::ModuleSP &module_sp, bool notify = true);
187
188 /// Append a module to the module list and remove any equivalent modules.
189 /// Equivalent modules are ones whose file, platform file and architecture
190 /// matches.
191 ///
192 /// Replaces the module to the collection.
193 ///
194 /// \param[in] module_sp
195 /// A shared pointer to a module to replace in this collection.
196 ///
197 /// \param[in] old_modules
198 /// Optional pointer to a vector which, if provided, will have shared
199 /// pointers to the replaced module(s) appended to it.
201 const lldb::ModuleSP &module_sp,
202 llvm::SmallVectorImpl<lldb::ModuleSP> *old_modules = nullptr);
203
204 /// Append a module to the module list, if it is not already there.
205 ///
206 /// \param[in] notify
207 /// If true, and a notifier function is set, the notifier function
208 /// will be called. Defaults to true.
209 ///
210 /// When this ModuleList is the Target's ModuleList, the notifier
211 /// function is Target::ModulesDidLoad -- the call to
212 /// ModulesDidLoad may be deferred when adding multiple Modules
213 /// to the Target, but it must be called at the end,
214 /// before resuming execution.
215 bool AppendIfNeeded(const lldb::ModuleSP &new_module, bool notify = true);
216
217 void Append(const ModuleList &module_list);
218
219 bool AppendIfNeeded(const ModuleList &module_list);
220
221 bool ReplaceModule(const lldb::ModuleSP &old_module_sp,
222 const lldb::ModuleSP &new_module_sp);
223
224 /// Clear the object's state.
225 ///
226 /// Clears the list of modules and releases a reference to each module
227 /// object and if the reference count goes to zero, the module will be
228 /// deleted.
229 void Clear();
230
231 /// Clear the object's state.
232 ///
233 /// Clears the list of modules and releases a reference to each module
234 /// object and if the reference count goes to zero, the module will be
235 /// deleted. Also release all memory that might be held by any collection
236 /// classes (like std::vector)
237 void Destroy();
238
239 /// Dump the description of each module contained in this list.
240 ///
241 /// Dump the description of each module contained in this list to the
242 /// supplied stream \a s.
243 ///
244 /// \param[in] s
245 /// The stream to which to dump the object description.
246 ///
247 /// \see Module::Dump(Stream *) const
248 void Dump(Stream *s) const;
249
250 void LogUUIDAndPaths(Log *log, const char *prefix_cstr);
251
252 std::recursive_mutex &GetMutex() const { return m_modules_mutex; }
253
254 size_t GetIndexForModule(const Module *module) const;
255
256 /// Get the module shared pointer for the module at index \a idx.
257 ///
258 /// \param[in] idx
259 /// An index into this module collection.
260 ///
261 /// \return
262 /// A shared pointer to a Module which can contain NULL if
263 /// \a idx is out of range.
264 ///
265 /// \see ModuleList::GetSize()
266 lldb::ModuleSP GetModuleAtIndex(size_t idx) const;
267
268 /// Get the module shared pointer for the module at index \a idx without
269 /// acquiring the ModuleList mutex. This MUST already have been acquired
270 /// with ModuleList::GetMutex and locked for this call to be safe.
271 ///
272 /// \param[in] idx
273 /// An index into this module collection.
274 ///
275 /// \return
276 /// A shared pointer to a Module which can contain NULL if
277 /// \a idx is out of range.
278 ///
279 /// \see ModuleList::GetSize()
281
282 /// Get the module pointer for the module at index \a idx.
283 ///
284 /// \param[in] idx
285 /// An index into this module collection.
286 ///
287 /// \return
288 /// A pointer to a Module which can by nullptr if \a idx is out
289 /// of range.
290 ///
291 /// \see ModuleList::GetSize()
292 Module *GetModulePointerAtIndex(size_t idx) const;
293
294 /// Find compile units by partial or full path.
295 ///
296 /// Finds all compile units that match \a path in all of the modules and
297 /// returns the results in \a sc_list.
298 ///
299 /// \param[in] path
300 /// The name of the compile unit we are looking for.
301 ///
302 /// \param[out] sc_list
303 /// A symbol context list that gets filled in with all of the
304 /// matches.
305 void FindCompileUnits(const FileSpec &path, SymbolContextList &sc_list) const;
306
307 /// \see Module::FindFunctions ()
308 void FindFunctions(ConstString name, lldb::FunctionNameType name_type_mask,
309 const ModuleFunctionSearchOptions &options,
310 SymbolContextList &sc_list) const;
311
312 /// \see Module::FindFunctionSymbols ()
314 lldb::FunctionNameType name_type_mask,
315 SymbolContextList &sc_list);
316
317 /// \see Module::FindFunctions ()
318 void FindFunctions(const RegularExpression &name,
319 const ModuleFunctionSearchOptions &options,
320 SymbolContextList &sc_list);
321
322 /// Find global and static variables by name.
323 ///
324 /// \param[in] name
325 /// The name of the global or static variable we are looking
326 /// for.
327 ///
328 /// \param[in] max_matches
329 /// Allow the number of matches to be limited to \a
330 /// max_matches. Specify UINT32_MAX to get all possible matches.
331 ///
332 /// \param[in] variable_list
333 /// A list of variables that gets the matches appended to.
334 void FindGlobalVariables(ConstString name, size_t max_matches,
335 VariableList &variable_list) const;
336
337 /// Find global and static variables by regular expression.
338 ///
339 /// \param[in] regex
340 /// A regular expression to use when matching the name.
341 ///
342 /// \param[in] max_matches
343 /// Allow the number of matches to be limited to \a
344 /// max_matches. Specify UINT32_MAX to get all possible matches.
345 ///
346 /// \param[in] variable_list
347 /// A list of variables that gets the matches appended to.
348 void FindGlobalVariables(const RegularExpression &regex, size_t max_matches,
349 VariableList &variable_list) const;
350
351 /// Finds modules whose file specification matches \a module_spec.
352 ///
353 /// \param[in] module_spec
354 /// A file specification object to match against the Module's
355 /// file specifications. If \a module_spec does not have
356 /// directory information, matches will occur by matching only
357 /// the basename of any modules in this list. If this value is
358 /// NULL, then file specifications won't be compared when
359 /// searching for matching modules.
360 ///
361 /// \param[out] matching_module_list
362 /// A module list that gets filled in with any modules that
363 /// match the search criteria.
364 void FindModules(const ModuleSpec &module_spec,
365 ModuleList &matching_module_list) const;
366
367 lldb::ModuleSP FindModule(const Module *module_ptr) const;
368
369 // Find a module by UUID
370 //
371 // The UUID value for a module is extracted from the ObjectFile and is the
372 // MD5 checksum, or a smarter object file equivalent, so finding modules by
373 // UUID values is very efficient and accurate.
374 lldb::ModuleSP FindModule(const UUID &uuid) const;
375
376 /// Find a module by LLDB-specific unique identifier.
377 ///
378 /// \param[in] uid The UID of the module assigned to it on construction.
379 ///
380 /// \returns ModuleSP of module with \c uid. Returns nullptr if no such
381 /// module could be found.
383
384 /// Finds the first module whose file specification matches \a module_spec.
385 lldb::ModuleSP FindFirstModule(const ModuleSpec &module_spec) const;
386
388 lldb::SymbolType symbol_type,
389 SymbolContextList &sc_list) const;
390
392 lldb::SymbolType symbol_type,
393 SymbolContextList &sc_list) const;
394
395 /// Find types using a type-matching object that contains all search
396 /// parameters.
397 ///
398 /// \param[in] search_first
399 /// If non-null, this module will be searched before any other
400 /// modules.
401 ///
402 /// \param[in] query
403 /// A type matching object that contains all of the details of the type
404 /// search.
405 ///
406 /// \param[in] results
407 /// Any matching types will be populated into the \a results object using
408 /// TypeMap::InsertUnique(...).
409 void FindTypes(Module *search_first, const TypeQuery &query,
410 lldb_private::TypeResults &results) const;
411
412 bool FindSourceFile(const FileSpec &orig_spec, FileSpec &new_spec) const;
413
414 /// Find addresses by file/line
415 ///
416 /// \param[in] target_sp
417 /// The target the addresses are desired for.
418 ///
419 /// \param[in] file
420 /// Source file to locate.
421 ///
422 /// \param[in] line
423 /// Source line to locate.
424 ///
425 /// \param[in] function
426 /// Optional filter function. Addresses within this function will be
427 /// added to the 'local' list. All others will be added to the 'extern'
428 /// list.
429 ///
430 /// \param[out] output_local
431 /// All matching addresses within 'function'
432 ///
433 /// \param[out] output_extern
434 /// All matching addresses not within 'function'
435 void FindAddressesForLine(const lldb::TargetSP target_sp,
436 const FileSpec &file, uint32_t line,
437 Function *function,
438 std::vector<Address> &output_local,
439 std::vector<Address> &output_extern);
440
441 /// Remove a module from the module list.
442 ///
443 /// \param[in] module_sp
444 /// A shared pointer to a module to remove from this collection.
445 ///
446 /// \param[in] notify
447 /// If true, and a notifier function is set, the notifier function
448 /// will be called. Defaults to true.
449 ///
450 /// When this ModuleList is the Target's ModuleList, the notifier
451 /// function is Target::ModulesDidUnload -- the call to
452 /// ModulesDidUnload may be deferred when removing multiple Modules
453 /// from the Target, but it must be called at the end,
454 /// before resuming execution.
455 bool Remove(const lldb::ModuleSP &module_sp, bool notify = true);
456
457 size_t Remove(ModuleList &module_list);
458
459 bool RemoveIfOrphaned(const lldb::ModuleWP module_ptr);
460
461 size_t RemoveOrphans(bool mandatory);
462
463 bool ResolveFileAddress(lldb::addr_t vm_addr, Address &so_addr) const;
464
465 /// \copydoc Module::ResolveSymbolContextForAddress (const Address
466 /// &,uint32_t,SymbolContext&)
467 uint32_t ResolveSymbolContextForAddress(const Address &so_addr,
468 lldb::SymbolContextItem resolve_scope,
469 SymbolContext &sc) const;
470
471 /// \copydoc Module::ResolveSymbolContextForFilePath (const char
472 /// *,uint32_t,bool,uint32_t,SymbolContextList&)
474 const char *file_path, uint32_t line, bool check_inlines,
475 lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) const;
476
477 /// \copydoc Module::ResolveSymbolContextsForFileSpec (const FileSpec
478 /// &,uint32_t,bool,uint32_t,SymbolContextList&)
480 const FileSpec &file_spec, uint32_t line, bool check_inlines,
481 lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) const;
482
483 /// Gets the size of the module list.
484 ///
485 /// \return
486 /// The number of modules in the module list.
487 size_t GetSize() const;
488 bool IsEmpty() const { return !GetSize(); }
489
490 bool LoadScriptingResourcesInTarget(Target *target, std::list<Status> &errors,
491 Stream &feedback_stream,
492 bool continue_on_error = true);
493
495
496 static bool ModuleIsInCache(const Module *module_ptr);
497
498 static Status
499 GetSharedModule(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
501 bool *did_create_ptr, bool invoke_locate_callback = true);
502
503 static bool RemoveSharedModule(lldb::ModuleSP &module_sp);
504
505 static void FindSharedModules(const ModuleSpec &module_spec,
506 ModuleList &matching_module_list);
507
508 static lldb::ModuleSP FindSharedModule(const UUID &uuid);
509
510 static size_t RemoveOrphanSharedModules(bool mandatory);
511
512 static bool RemoveSharedModuleIfOrphaned(const lldb::ModuleWP module_ptr);
513
514 /// Applies 'callback' to each module in this ModuleList.
515 /// If 'callback' returns false, iteration terminates.
516 /// The 'module_sp' passed to 'callback' is guaranteed to
517 /// be non-null.
518 ///
519 /// This function is thread-safe.
520 void
521 ForEach(std::function<IterationAction(const lldb::ModuleSP &module_sp)> const
522 &callback) const;
523
524 /// Returns true if 'callback' returns true for one of the modules
525 /// in this ModuleList.
526 ///
527 /// This function is thread-safe.
528 bool AnyOf(
529 std::function<bool(lldb_private::Module &module)> const &callback) const;
530
531 /// Atomically swaps the contents of this module list with \a other.
532 void Swap(ModuleList &other);
533
534 /// For each module in this ModuleList, preload its symbols.
535 ///
536 /// \param[in] parallelize
537 /// If true, all modules will be preloaded in parallel.
538 void PreloadSymbols(bool parallelize) const;
539
540protected:
541 // Class typedefs.
542 typedef std::vector<lldb::ModuleSP>
543 collection; ///< The module collection type.
544
545 void AppendImpl(const lldb::ModuleSP &module_sp, bool use_notifier = true);
546
547 bool RemoveImpl(const lldb::ModuleSP &module_sp, bool use_notifier = true);
548
549 collection::iterator RemoveImpl(collection::iterator pos,
550 bool use_notifier = true);
551
552 void ClearImpl(bool use_notifier = true);
553
554 // Member variables.
555 collection m_modules; ///< The collection of modules.
556 mutable std::recursive_mutex m_modules_mutex;
557
559
560 /// An orphaned module that lives only in the ModuleList has a count of 1.
561 static constexpr long kUseCountModuleListOrphaned = 1;
562
563public:
568 }
569
570 typedef llvm::iterator_range<collection::const_iterator>
575};
576
577} // namespace lldb_private
578
579#endif // LLDB_CORE_MODULELIST_H
A section + offset based address class.
Definition Address.h:62
A uniqued constant string class.
Definition ConstString.h:40
A file collection class.
A file utility class.
Definition FileSpec.h:57
A class that describes a function.
Definition Function.h:400
bool SetClangModulesCachePath(const FileSpec &path)
lldb::SymbolDownload GetSymbolAutoDownload() const
bool SetLLDBIndexCachePath(const FileSpec &path)
bool SetEnableExternalLookup(bool new_value)
PathMappingList GetSymlinkMappings() const
lldb::SymbolSharedCacheUse GetSharedCacheBinaryLoading() const
FileSpec GetClangModulesCachePath() const
llvm::sys::RWMutex m_symlink_paths_mutex
Definition ModuleList.h:95
bool SetEnableLLDBIndexCache(bool new_value)
virtual void NotifyModuleAdded(const ModuleList &module_list, const lldb::ModuleSP &module_sp)=0
virtual void NotifyModuleUpdated(const ModuleList &module_list, const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp)=0
virtual void NotifyModuleRemoved(const ModuleList &module_list, const lldb::ModuleSP &module_sp)=0
virtual void NotifyWillClearList(const ModuleList &module_list)=0
virtual void NotifyModulesRemoved(lldb_private::ModuleList &module_list)=0
A collection class for Module objects.
Definition ModuleList.h:125
bool ReplaceModule(const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp)
std::vector< lldb::ModuleSP > collection
The module collection type.
Definition ModuleList.h:543
collection m_modules
The collection of modules.
Definition ModuleList.h:555
llvm::iterator_range< collection::const_iterator > ModuleIterableNoLocking
Definition ModuleList.h:571
void ClearImpl(bool use_notifier=true)
uint32_t ResolveSymbolContextsForFileSpec(const FileSpec &file_spec, uint32_t line, bool check_inlines, lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) const
Resolve items in the symbol context for a given file and line. (const FileSpec&,...
static bool RemoveSharedModule(lldb::ModuleSP &module_sp)
void FindFunctions(ConstString name, lldb::FunctionNameType name_type_mask, const ModuleFunctionSearchOptions &options, SymbolContextList &sc_list) const
bool FindSourceFile(const FileSpec &orig_spec, FileSpec &new_spec) const
bool AnyOf(std::function< bool(lldb_private::Module &module)> const &callback) const
Returns true if 'callback' returns true for one of the modules in this ModuleList.
ModuleIterableNoLocking ModulesNoLocking() const
Definition ModuleList.h:572
static constexpr long kUseCountModuleListOrphaned
An orphaned module that lives only in the ModuleList has a count of 1.
Definition ModuleList.h:561
static bool ModuleIsInCache(const Module *module_ptr)
void FindGlobalVariables(ConstString name, size_t max_matches, VariableList &variable_list) const
Find global and static variables by name.
void Swap(ModuleList &other)
Atomically swaps the contents of this module list with other.
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)
size_t GetIndexForModule(const Module *module) const
std::recursive_mutex & GetMutex() const
Definition ModuleList.h:252
bool RemoveImpl(const lldb::ModuleSP &module_sp, bool use_notifier=true)
lldb::ModuleSP FindFirstModule(const ModuleSpec &module_spec) const
Finds the first module whose file specification matches module_spec.
void Clear()
Clear the object's state.
ModuleList()
Default constructor.
void Dump(Stream *s) const
Dump the description of each module contained in this list.
collection::iterator RemoveImpl(collection::iterator pos, bool use_notifier=true)
void FindTypes(Module *search_first, const TypeQuery &query, lldb_private::TypeResults &results) const
Find types using a type-matching object that contains all search parameters.
uint32_t ResolveSymbolContextForFilePath(const char *file_path, uint32_t line, bool check_inlines, lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) const
Resolve items in the symbol context for a given file and line. (const char*,uint32_t,...
lldb::ModuleSP GetModuleAtIndexUnlocked(size_t idx) const
Get the module shared pointer for the module at index idx without acquiring the ModuleList mutex.
static bool RemoveSharedModuleIfOrphaned(const lldb::ModuleWP module_ptr)
void FindCompileUnits(const FileSpec &path, SymbolContextList &sc_list) const
Find compile units by partial or full path.
void PreloadSymbols(bool parallelize) const
For each module in this ModuleList, preload its symbols.
const ModuleList & operator=(const ModuleList &rhs)
Assignment operator.
std::recursive_mutex m_modules_mutex
Definition ModuleList.h:556
bool AppendIfNeeded(const lldb::ModuleSP &new_module, bool notify=true)
Append a module to the module list, if it is not already there.
Module * GetModulePointerAtIndex(size_t idx) const
Get the module pointer for the module at index idx.
void FindSymbolsWithNameAndType(ConstString name, lldb::SymbolType symbol_type, SymbolContextList &sc_list) const
static lldb::ModuleSP FindSharedModule(const UUID &uuid)
lldb::ModuleSP FindModule(const Module *module_ptr) const
static ModuleListProperties & GetGlobalModuleListProperties()
void FindModules(const ModuleSpec &module_spec, ModuleList &matching_module_list) const
Finds modules whose file specification matches module_spec.
void FindAddressesForLine(const lldb::TargetSP target_sp, const FileSpec &file, uint32_t line, Function *function, std::vector< Address > &output_local, std::vector< Address > &output_extern)
Find addresses by file/line.
uint32_t ResolveSymbolContextForAddress(const Address &so_addr, lldb::SymbolContextItem resolve_scope, SymbolContext &sc) const
Resolve the symbol context for the given address. (const Address&,uint32_t,SymbolContext&)
bool Remove(const lldb::ModuleSP &module_sp, bool notify=true)
Remove a module from the module list.
size_t RemoveOrphans(bool mandatory)
lldb::ModuleSP GetModuleAtIndex(size_t idx) const
Get the module shared pointer for the module at index idx.
void Append(const lldb::ModuleSP &module_sp, bool notify=true)
Append a module to the module list.
static size_t RemoveOrphanSharedModules(bool mandatory)
void Destroy()
Clear the object's state.
LockingAdaptedIterable< std::recursive_mutex, collection > ModuleIterable
Definition ModuleList.h:565
void AppendImpl(const lldb::ModuleSP &module_sp, bool use_notifier=true)
bool LoadScriptingResourcesInTarget(Target *target, std::list< Status > &errors, Stream &feedback_stream, bool continue_on_error=true)
void ReplaceEquivalent(const lldb::ModuleSP &module_sp, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules=nullptr)
Append a module to the module list and remove any equivalent modules.
void FindFunctionSymbols(ConstString name, lldb::FunctionNameType name_type_mask, SymbolContextList &sc_list)
static void FindSharedModules(const ModuleSpec &module_spec, ModuleList &matching_module_list)
void FindSymbolsMatchingRegExAndType(const RegularExpression &regex, lldb::SymbolType symbol_type, SymbolContextList &sc_list) const
ModuleIterable Modules() const
Definition ModuleList.h:566
bool ResolveFileAddress(lldb::addr_t vm_addr, Address &so_addr) const
size_t GetSize() const
Gets the size of the module list.
bool RemoveIfOrphaned(const lldb::ModuleWP module_ptr)
void LogUUIDAndPaths(Log *log, const char *prefix_cstr)
void ForEach(std::function< IterationAction(const lldb::ModuleSP &module_sp)> const &callback) const
Applies 'callback' to each module in this ModuleList.
A class that describes an executable image and its associated object and symbol files.
Definition Module.h:90
An error handling class.
Definition Status.h:118
A stream class that can stream formatted output to a file.
Definition Stream.h:28
Defines a list of symbol context objects.
Defines a symbol context baton that can be handed other debug core functions.
Provides public interface for all SymbolFiles.
Definition SymbolFile.h:51
A class that contains all state required for type lookups.
Definition Type.h:104
This class tracks the state and results of a TypeQuery.
Definition Type.h:344
Represents UUID's of various sizes.
Definition UUID.h:27
A class that represents a running process on the host machine.
static constexpr OptionEnumValueElement g_shared_cache_use_enum_values[]
Definition ModuleList.h:71
IterationAction
Useful for callbacks whose return type indicates whether to continue iteration or short-circuit.
static constexpr OptionEnumValueElement g_auto_download_enum_values[]
Definition ModuleList.h:51
std::weak_ptr< lldb_private::Module > ModuleWP
@ eSymbolSharedCacheUseHostSharedCache
@ eSymbolSharedCacheUseInferiorSharedCacheOnly
@ eSymbolSharedCacheUseHostLLDBMemory
@ eSymbolSharedCacheUseHostAndInferiorSharedCache
SymbolType
Symbol types.
uint64_t user_id_t
Definition lldb-types.h:82
uint64_t addr_t
Definition lldb-types.h:80
std::shared_ptr< lldb_private::Target > TargetSP
@ eSymbolDownloadBackground
@ eSymbolDownloadForeground
std::shared_ptr< lldb_private::Module > ModuleSP
Options used by Module::FindFunctions.
Definition Module.h:66