getsentry / symbolicator

Native Symbolication as a Service
https://getsentry.github.io/symbolicator/
MIT License
358 stars 47 forks source link

Support source code fetching via debuginfod #445

Closed fche closed 2 months ago

fche commented 3 years ago

Via pull #142 back in 2019, symbolicator learned to fetch debuginfo & executables from debuginfod servers. The server also has a source code fetching webapi (/buildid/HEXCODE/source/PATH), which should not be too hard to make use of. It does not supply a "bundle" in the sense of a zip file, but individual source files.

vaind commented 1 year ago

The new source-link support for PPDB should be a good step towards implementing this too. https://github.com/getsentry/symbolicator/pull/1103/files#diff-01996d90eae63193cc43413d280444d2271905de228d87dbaba4d5bfdc53f1d9R405

fche commented 3 months ago

By the way, the elfutils toolkit now includes a tool called "eu-srcfiles". With that, it is possible to enumerate all known source files associated with a given binary/buildid known to a debuginfod fleet. Further, the tool can download all of those source files and produce a single zip file.

% export DEBUGINFOD_URLS=whatever % eu-srcfiles -e /bin/ls -z > foo.zip % unzip -v foo.zip

https://developers.redhat.com/blog/2024/04/15/interns-experience-tool-development-growth-and-open-source-red-hat