Writing core files to contain buildids
Tue Oct 27 20:20:51 GMT 2020
On Tue, 2020-10-27 at 15:39 +0100, Mark Wielaard wrote:
> The basic idea behind getting buildids into core files is that they
> (the GNU ELF notes) are at the start of the file in the first page
> that is dumped (together with the phdrs) in the core file so when
> core file consumers can walk the program headers and find the buildid
> note (almost immediately following those headers).
Something is missing; if I check the binary I see a build ID in it. I
can control whether the userspace coredumper or the kernel coredumper
is used via an environment variable: the kernel-generated core contains
a full set of build ID values including vdso.so, the binary, and all
But when using the userspace coredumper I get a completely valid
coredump that GDB is happy with, for example, but there is only the
vdso.so build ID present: I don't see any build IDs from the binary or
I guess another possibility is that they are there but eu-unstrip
--core can't find them?
The userspace coredumper uses the output of /proc/self/maps and
/proc/self/smaps to determine what memory to dump; the code is a bit
hairy but I will investigate what's going on.
The parsing of the maps starts here (I don't really expect anyone to
read this but if you're curious):
and the write-out starts here:
> A few more technical details can be found at:
Thanks I did see that but I will read it harder.
More information about the Elfutils-devel