[Lldb-commits] [PATCH] D158182: [lldb] Try to find relative DWO files by file name only, as a last resort

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 17 11:23:41 PDT 2023


clayborg requested changes to this revision.
clayborg added inline comments.
This revision now requires changes to proceed.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:1784-1804
+      FileSpec spec_to_get_name(dwo_name);
+      llvm::StringRef filename_only = spec_to_get_name.GetFilename();
+
+      // Try binary dir plus DWO filename only.
+      FileSpec filename_next_to_binary(
+          m_objfile_sp->GetFileSpec().GetDirectory().GetStringRef());
+      FileSystem::Instance().Resolve(filename_next_to_binary);
----------------
Would it be better to move this out of the "if (!dwo_file.IsRelative())" and else statement?


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:1815
   }
 
   if (!found) {
----------------
Maybe move it here? That way even if we have a non-relative path to a .dwo file, it could find it locally or in the search paths?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158182/new/

https://reviews.llvm.org/D158182



More information about the lldb-commits mailing list