[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 21 15:43:57 PDT 2023


dwblaikie wrote:

> > > > Should this be able to work implicitly, same as a debugger? (presumably there's some logic (both as a concept, but concretely as code in lldb or somewhere similar) that knows how to find dsyms when they're in some standard layout (presumably `binary_name` has `binary_name.dsym` next to it, maybe some search path too)) Not sure if the debugger even has a way to explicitly tell it where a dsym is - and if it doesn't, probably not suitable to add such a thing to other debug info-consuming tools?
> > > 
> > > 
> > > Yes, and `llvm-cov` already supports it through the `BuildIDFetcher` interface that @mysterymath created, we just need to wire it up.
> > 
> > 
> > Should we do that ("wire it up") instead of this patch, or is this patch part of that, or is there some motivation to do both?
> 
> The whole BuildIDFetcher mechanism depends on the object being available for lookup via its build ID; it's common for linkers to stamp binaries in this way, but usually some specific setup has to be done to actually place the files there. So it seems somewhat orthogonal to a flag that allows directly pointing to a file.

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.

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


More information about the llvm-commits mailing list