[Lldb-commits] [lldb] [lldb][Module] Only call LoadScriptingResourceInTarget via ModuleList (PR #190136)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 2 08:44:36 PDT 2026
================
@@ -1332,6 +1332,90 @@ bool ModuleList::RemoveSharedModuleIfOrphaned(const ModuleWP module_wp) {
return GetSharedModuleList().RemoveIfOrphaned(module_wp);
}
+static bool LoadScriptingModule(const FileSpec &scripting_fspec,
+ ScriptInterpreter &script_interpreter,
+ Target &target, Status &error) {
+ assert(scripting_fspec);
+
+ StreamString scripting_stream;
+ scripting_fspec.Dump(scripting_stream.AsRawOstream());
+ LoadScriptOptions options;
+ return script_interpreter.LoadScriptingModule(
+ scripting_stream.GetData(), options, error,
+ /*module_sp*/ nullptr, /*extra_path*/ {}, target.shared_from_this());
+}
+
+bool ModuleList::LoadScriptingResourceInTargetForModule(Module &module,
+ Target &target,
+ Status &error) {
----------------
JDevlieghere wrote:
Can this return an `llvm::Error`?
https://github.com/llvm/llvm-project/pull/190136
More information about the lldb-commits
mailing list