Ok, so how can we get these canonicalized backtrace PCs from core
file? I mean
what lib or tool should we use?
The examples I gave before were of the libdwfl core file support (elfutils).
Given an absolute PC, you would use dwfl_addrmodule to find the containing
module. Then there are calls to get the module start address to subtract
from the absolute PC, and to get the build ID bits.
If you are doing this in scripts rather than in C, you can use eu-unstrip -n
as I showed in the example earlier and then do your own trivial parsing and
arithmetic.
If you are asking about the actual backtrace-finding piece (getting the
absolute PCs), that is a different set of stories. (There are many moving
parts to the whole thing. In this thread I was addressing the essential
question of what "identification of coredumps" means.)
Thanks,
Roland