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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 21:38:44 PDT 2023


dwblaikie 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

Fair enough - presumably we have some code in llvm-symbolizer or some other LLVM tools that does something like this too? Otherwise we could move the lldb code into somewhere in LLVM to reuse.

> Also note that ELF supports external debug info so the premise

Ish - there's been some support for using debuginfod to retrieve stripped debug info on ELF. Not sure if there's a clear abstraction over all these lookup mechanisms. Might be worth making one, or maybe they're significantly different codepaths anyway.



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


More information about the llvm-commits mailing list