Bug 13807 - Add support for elfutils debuginfod
Summary: Add support for elfutils debuginfod
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 5.99
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 3.3 M3
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard: newcomer
Depends on:
Blocks:
 
Reported: 2020-02-21 11:14 UTC by Ross Burton
Modified: 2021-03-25 13:23 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2020-02-21 11:14:35 UTC
debuginfod from elfutils 0.178 onwards is a way to distribute debuginfo files.   Some background and context here:

https://fosdem.org/2020/schedule/event/debugging_debuginfod/attachments/slides/3887/export/events/attachments/debugging_debuginfod/slides/3887/debuginfod.pdf

Yocto should support this out of the box.  Initial work items:
1) Enable debuginfod in elfutils.  This should be a PACKAGECONFIG, and the build needs some extra dependencies (libmicrohttpd curl sqlite3 libarchive).  Initially disabled by default.

2) Add support for ipkg to the debuginfod scanner. 0.178 only supports RPM but the next release (and git master) can also scan .debs, and as ipkgs are binary-compatible with dpkg then this is a trivial addition to the filename matching.

3) Verify that running debuginfod manually over $DEPLOY_DIR and setting DEBUGINFOD_URLS correctly works. Test case: debuginfod-find source hexcode /bin/bash.

4) Determine final integration. Straw man proposal: a class that turns on debuginfod for elfutils and sets DEBUGINFOD_URLS in the image, and a script that runs the elfutils-native debuginfod on DEPLOY_DIR.
Comment 1 Ross Burton 2020-02-27 14:52:13 UTC
Further update: gdb now supports debuginfod.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=0d79cdc494d5eb9db26a602d62c92d49f83f407e

I left out step 3.5) enable debuginfod for gdb.  Now the patch is upstream we can backport that patch.
Comment 2 Randy MacLeod 2020-02-27 15:43:07 UTC
As of Feb 27, this seems like a work in progress but one that is almost finish (see ClearLinux). We should just go ahead but keep the status of the project in mind.
Comment 3 Tim Orling 2020-02-27 15:47:36 UTC
ClearLinux has recently disabled this in elfutils:
https://github.com/clearlinux-pkgs/elfutils/commit/59d1e17fa224934416bbd12130145055871472c8
Comment 4 Trevor Woerner 2020-02-28 02:10:00 UTC
video of talk linked from:
https://fosdem.org/2020/schedule/event/debugging_debuginfod/
Comment 5 Paul Eggleton 2020-10-03 04:06:13 UTC
Have submitted this as an Outreachy project for the upcoming internship round - co-mentors would be welcome :)
Comment 6 Ross Burton 2020-10-05 02:02:34 UTC
I'll happily join you in mentoring this Paul, thanks for taking the initiative on that.
Comment 7 Ross Burton 2021-02-11 13:46:12 UTC
Dorinda is working on this with Outreachy.
Comment 8 Ross Burton 2021-03-25 13:23:19 UTC
All merged in oe-core with 410083f93e2c986247cf3a2ff5050847e10cf359.

Thanks to Dorinda for the work!