Skip to content

Conversation

@vogelsgesang
Copy link
Member

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.

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.
@llvmbot
Copy link
Member

llvmbot commented Nov 15, 2024

@llvm/pr-subscribers-lldb

Author: Adrian Vogelsgesang (vogelsgesang)

Changes

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 --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 "

@labath
Copy link
Collaborator

labath commented Nov 18, 2024

The error logged above the code you're adding is visible through image dump separate-debug-info (and it doesn't require logging to be enabled beforehand). Would that be sufficient?

@vogelsgesang
Copy link
Member Author

yes, that is sufficient. Didn't know about image dump separate-debug-info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants