Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lldb/include/lldb/Target/InstrumentationRuntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ class InstrumentationRuntime
/// is guaranteed to be loaded.
virtual void Activate() = 0;

/// \return true if `CheckIfRuntimeIsValid` should be called on all modules.
/// In this case the return value of `GetPatternForRuntimeLibrary` will be
/// ignored. Return false if `CheckIfRuntimeIsValid` should only be called
/// for modules whose name matches `GetPatternForRuntimeLibrary`.
///
virtual bool MatchAllModules() { return false; }

public:
static void ModulesDidLoad(lldb_private::ModuleList &module_list,
Process *process,
Expand Down
3 changes: 2 additions & 1 deletion lldb/source/Target/InstrumentationRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ void InstrumentationRuntime::ModulesDidLoad(
return IterationAction::Continue;

const RegularExpression &runtime_regex = GetPatternForRuntimeLibrary();
if (runtime_regex.Execute(file_spec.GetFilename().GetCString()) ||
if (MatchAllModules() ||
runtime_regex.Execute(file_spec.GetFilename().GetCString()) ||
module_sp->IsExecutable()) {
if (CheckIfRuntimeIsValid(module_sp)) {
SetRuntimeModuleSP(module_sp);
Expand Down
Loading