diff options
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r-- | lldb/source/API/SBTarget.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index e17355f0de3..fefc70afc65 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -1591,7 +1591,7 @@ lldb::SBModule SBTarget::AddModule(const char *path, const char *triple, if (symfile) module_spec.GetSymbolFileSpec().SetFile(symfile, FileSpec::Style::native); - sb_module.SetSP(target_sp->GetSharedModule(module_spec)); + sb_module.SetSP(target_sp->GetOrCreateModule(module_spec, true /* notify */)); } return LLDB_RECORD_RESULT(sb_module); } @@ -1603,7 +1603,8 @@ lldb::SBModule SBTarget::AddModule(const SBModuleSpec &module_spec) { lldb::SBModule sb_module; TargetSP target_sp(GetSP()); if (target_sp) - sb_module.SetSP(target_sp->GetSharedModule(*module_spec.m_opaque_up)); + sb_module.SetSP(target_sp->GetOrCreateModule(*module_spec.m_opaque_up, + true /* notify */)); return LLDB_RECORD_RESULT(sb_module); } |