[Lldb-commits] [lldb] [lldb] Add logging for missing `.dwo` files (PR #116436)

via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 15 13:05:13 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Adrian Vogelsgesang (vogelsgesang)

<details>
<summary>Changes</summary>

I had a hard time to debug a `dwo` file whose file was not found. This log message would have saved me a lot of time.

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


1 Files Affected:

- (modified) lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (+8) 


``````````diff
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 666595a6d0635f..2bb41903beb3b4 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1963,6 +1963,14 @@ SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(
         "{1:x16}",
         error_dwo_path.GetPath().c_str(), cu_die.GetOffset()));
 
+    if (Log *log = GetLog(LLDBLog::Symbols)) {
+      GetObjectFile()->GetModule()->LogMessage(
+          log,
+          "unable to locate .dwo debug file \"{0}\" for skeleton DIE "
+          "{1:x16}",
+          error_dwo_path.GetPath().c_str(), unit.GetOffset());
+    }
+
     if (m_dwo_warning_issued.test_and_set(std::memory_order_relaxed) == false) {
       GetObjectFile()->GetModule()->ReportWarning(
           "unable to locate separate debug file (dwo, dwp). Debugging will be "

``````````

</details>


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


More information about the lldb-commits mailing list