[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:16:06 PDT 2023


clayborg added a comment.

We are also looking for a way to locate .dwo files at Meta. One idea we came up with is to add a setting that can be set:

  (lldb) settings set symbols.locate-dwo-script /path/to/locate-dwo.py

Any specified scripts would be expect to contain a python function:

  def locate_dwo(exe_path: lldb.SBFileSpec, dwo_path: lldb.SBFileSpec, dwo_id: str):
    # Add code to locate the .dwo file here...

All of our binaries are built in a "buck-out" directory and the .dwo file paths are relative this to folder regardless of the DW_AT_comp_dir value. If we pass the executable into this function, we can search for "/buck-out/" in the path, and then use the first part of the path as a prefix and return a valid path.

This kind of solution might allow distributed build systems to not have to download all of the .dwo files until they are requested and the script could download them and return a path.

The current solution in this patch is nice and simple and would also work, but it would require us to know up front where these directories are so that we can set the setting correctly which is what we are trying to avoid as if someone tries to debug and doesn't see variables due to not being able to find a .dwo file, then some turn the "printf pro".


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