Re: Does gdb debuginfod download libc etc.?

Paul Smith via Gdb
2026-03-09T21:20:30Z

On Mon, 2026-03-09 at 16:32 -0400, Paul Smith via Gdb wrote:
> Ah, this is very useful.  Unfortunately it leads me to this
> discovery;
> the only output I get from this is:
>
> (gdb) core-file /data/psh13/tmp/core
> [core-load] build_file_mappings: enter
> [core-load] build_file_mappings: exit

More debugging shows that linux_read_core_file_mappings() is returning
early due to this:

/* It's not required that the NT_FILE note exists, so return silently
if it's not found. Beyond this point though, we'll complain
if problems are found. */
asection *section = bfd_get_section_by_name (cbfd, ".note.linuxcore.file");
if (section == nullptr)
return;

(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.