Bug 492429

Summary: Add support for MiniDebugInfo (.gnu_debugdata)
Product: [Developer tools] valgrind Reporter: Sam James <sam>
Component: generalAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: mark
Priority: NOR    
Version: 3.24 GIT   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Sam James 2024-08-30 22:57:52 UTC
I'm currently doing some _very_ preliminary investigation on supporting, and perhaps enabling by default down-the-line, MiniDebugInfo (.gnu_debugdata) [0] in Gentoo.

It looks like Valgrind doesn't currently support this. The main advantage is that it allows working where symtab is missing.

[0] https://sourceware.org/gdb/current/onlinedocs/gdb.html/MiniDebugInfo.html
Comment 1 Sam James 2024-08-30 23:00:21 UTC
FWIW, it looks like Fedora does this by default [1], but it may be of less interest to Valgrind given Valgrind supports debuginfod these days.

[1] https://fedoraproject.org/wiki/Features/MiniDebugInfo
Comment 2 Sam James 2024-08-30 23:50:22 UTC
elfutils (naturally) already supports it in dwfl_module_getdwarf's find_aux_sym, but I don't think debuginfod is wired up for it given it's supposed to be in the same binary. Dunno if it makes sense to try hack in debuginfod support so Valgrind doesn't need to implement it, or not.
Comment 3 Mark Wielaard 2024-08-31 02:00:01 UTC
(In reply to Sam James from comment #2)
> elfutils (naturally) already supports it in dwfl_module_getdwarf's
> find_aux_sym, but I don't think debuginfod is wired up for it given it's
> supposed to be in the same binary. Dunno if it makes sense to try hack in
> debuginfod support so Valgrind doesn't need to implement it, or not.

I don't think it really makes sense for debuginfod to have specific support for the .gnu_debugdata section/format given the section is supposed to be in the main executable already.

To process .gnu_debugdata we need to support lzma decompression though.