Re: Does gdb debuginfod download libc etc.?
Mark Wielaard <[email protected]> Tue, 10 Mar 2026 10:12:03 +0100
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Paul, On Mon, Mar 09, 2026 at 05:19:44PM -0400, Paul Smith via Gdb wrote: > (Most of) my core files are generated by the Google coredumper library, > not by the Linux kernel, and I guess they don't have this note section. > > It appears that this note section isn't actually required in order for > us to access the build ID values (after all, elfutils does it), but > this function gives up if the section doesn't exist. > > I can look into how to force my cores to have this section, but I'd > really like to teach GDB how to handle core files without it, since I > have a lot of them and will likely continue to get them for some time > even if I do manage to make this change to new releases. Not sure this helps, since I know very little about gdb/bfd, but the way elfutils gets at the build-id is to represent each core PT_LOAD as an Elf and then tries to read the NOTEs either through the section headers or the program headers. See https://sourceware.org/cgit/elfutils/tree/libdwelf/dwelf_elf_gnu_build_id.c This is somewhat simpler in elfutils because it just deals with ELF files and doesn't care about other binary formats. Maybe there is a simple mapping from bfd to elf sections/segements to do the same? Cheers, Mark