[Lldb-commits] [lldb] [lldb][Module] Add logging when script import fails (PR #189695)

via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 31 08:45:53 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Michael Buch (Michael137)

<details>
<summary>Changes</summary>

We already log the import attempt. This patch logs the failure to load the script since otherwise the log may be misleading. Didn't think it was worth adding a test-case for this.

---
Full diff: https://github.com/llvm/llvm-project/pull/189695.diff


1 Files Affected:

- (modified) lldb/source/Core/Module.cpp (+5-1) 


``````````diff
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 3d33a5011fb5e..802964bfad160 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1503,8 +1503,12 @@ To run all discovered debug scripts in this session:
              scripting_fspec.GetPath());
 
     if (!LoadScriptingModule(scripting_fspec, *script_interpreter, *target,
-                             error))
+                             error)) {
+      LLDB_LOG(GetLog(LLDBLog::Modules),
+               "Failed to load '{0}'. Remaining scripts won't be loaded.",
+               scripting_fspec.GetPath());
       return false;
+    }
   }
 
   return true;

``````````

</details>


https://github.com/llvm/llvm-project/pull/189695


More information about the lldb-commits mailing list