[Lldb-commits] [PATCH] D157609: [lldb] Search debug file paths when looking for split DWARF files

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 14 16:03:59 PDT 2023


clayborg added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:1737
+  if (!dwo_file.IsRelative()) {
+    found = FileSystem::Instance().Exists(dwo_file);
+  } else {
----------------
Maybe we can also check the debug info search paths to see if they contain just the basename in case someone sends you a binary and any needed .dwo files?

So if we have a DWO path of "/users/someone/build/foo.dwo", we would check each of the debug info search paths for:
```
path + dwo_file.GetFilename()
```
This would allow someone to send a binary to someone else and allow them to load it up.

But any such search might belong down below this entire if/else statement when the file isn't found:

```
if (!found) {
  // Search for debug info path + basename...
}
```


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:1795
 
-  if (!FileSystem::Instance().Exists(dwo_file)) {
+  if (!found) {
     unit.SetDwoError(Status::createWithFormat(
----------------
Here is where we might think about doing the debug info search path + basename searches since it doesn't matter if the .dwo file original path was relative or not.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157609



More information about the lldb-commits mailing list