This adds a Debuginfod client library which queries servers specified by the DEBUGINFOD_URLS environment variable for the debuginfo, executable, or a specified source file associated with a given build id.
This diff was split out from D111252.
Differential D112758
[llvm] [Debuginfo] Debuginfod client library. noajshu on Oct 28 2021, 2:15 PM. Authored by
Details This adds a Debuginfod client library which queries servers specified by the DEBUGINFOD_URLS environment variable for the debuginfo, executable, or a specified source file associated with a given build id. This diff was split out from D111252.
Diff Detail Event Timeline
Comment Actions I integrated the client library into llvm-symbolizer (D113717) and found that a lot of boilerplate was required. So I refactored the interface to make it easier to use.
Comment Actions Add a typedef ArrayRef<uint8_t> BuildID; and change external API of debuginfod library to require. Also remove unnecessary const qualifiers from args.
Comment Actions Update to use DEBUGINFOD_TIMEOUT and DEBUGINFOD_CACHE_PATH env vars and add unit tests for cache hit / miss.
Comment Actions Convert timeout for debuginfod client library to be in std::chrono::milliseconds, miscellaneous typo fixes.
Comment Actions Update HTTPClient::setTimeout to accept std::chrono::milliseconds and use empty vector of URLs when DEBUGINFOD_URLS is not set.
Comment Actions Due to the passing x64 windows check with the setenv fix I'm going to try committing this again and watch for any issues.
|
I'd consider using const ArrayRef<uint8_t> BuildID and do the conversion to string internally (in which case even buildIDToString could be an internal function).