[Lldb-commits] [PATCH] D37295: [lldb] Adjust UpdateExternalModuleListIfNeeded method for the case of *.dwo

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 30 12:57:58 PDT 2017


clayborg added a comment.

Can you explain the issue with an example?



================
Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:1644-1656
+            // A *.dwo file itself can have DW_AT_GNU_dwo_name (but no
+            // DW_AT_comp_dir) (clang 4.0 generates such DWOs). In this case
+            // there is no need to try to get a new module, and, more over, if
+            // we try (below) the method ModuleList::GetSharedModule will return
+            // an error + nullptr since the path is ill-formed (because comp_dir
+            // is null (since DW_AT_comp_dir is not present)).
+            if (m_obj_file->GetFileSpec()
----------------
So this is checking if the extension is ".dwo" and if the object file's path is the same as the .dwo file's path? Can you give an example of what fails? I'm having a hard time understanding what this is doing. Skipping a dwo file because it doesn't have a DW_AT_comp_dir? If the DW_AT_GNU_dwo_name is relative, then there really should be a DW_AT_comp_dir. Otherwise unless we run from the directory things are relative to, we don't find the .dwo file.


Repository:
  rL LLVM

https://reviews.llvm.org/D37295





More information about the lldb-commits mailing list