[compiler-rt] [llvm-cov] Add --debug-info flag to llvm-cov to lookup debug info file. (PR #66798)

David Tellenbach via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 13:46:29 PDT 2023


dtellenbach wrote:

> OK, so I'd still come back to my original question: How does lldb currently find dsyms for binaries just on the local filesystem, and can `llvm-cov` use the same logic? (ideally literally share the same code, but if not that, then at least equivalent lookup rules) - I imagine `llvm-symbolizer` already has such logic as well for the same reason, so share that, maybe? Looks like llvm-symbolizer has a `dsym-hint` flag, so perhaps `llvm-cov` could do the same thing? Be good to find some consistency with existing tools - lldb, symbolizer, etc.

On macOS you'd use UUIDs to look these things up by invoking `dsymForUUID`. Here's how `lldb` does it: https://github.com/llvm/llvm-project/blob/d28a782542aff50abf2b072780748ce57d982705/lldb/source/Symbol/LocateSymbolFileMacOSX.cpp#L523

Also note that ELF supports external debug info so the premise

> I was assuming the debug info is always in the binary,

seems to be wrong for at least MachO and ELF.

https://github.com/llvm/llvm-project/pull/66798


More information about the llvm-commits mailing list