build-ids, .debug_sup and other IDs
Wed Feb 24 20:11:21 GMT 2021
>>>>> "Mark" == Mark Wielaard <firstname.lastname@example.org> writes:
>> This patch adds support for this to gdb. It is largely
>> straightforward, I think, though one oddity is that I chose not to
>> have this code search the system build-id directories for the
>> supplementary file. My feeling was that, while it makes sense for a
>> distro to unify the build-id concept with the hash stored in the
>> .debug_sup section, there's no intrinsic need to do so.
Mark> Any opinions on whether we should split these concepts out and introduce
Mark> separate request mechanisms per ID-kind, or simply assume a globally
Mark> unique id is globally unique and we just clarify what it means to use
Mark> a build-id, sup_checksum or dwo_id together with a request for an
Mark> executable, debuginfo or source/file?
FWIW I looked a little at unifying these. For example,
bfdopncls.c:bfd_get_alt_debug_link_info could look at both the build-id
But, this seemed a bit weird. What if both appear and they are
different? Then a single API isn't so great -- you want to check the ID
corresponding to whatever was in the original file.
Probably I should have stuck some of the new code into BFD though.
It's not too late to do that at least.
I suppose a distro can ensure that the IDs are always equal. Maybe
debuginfod could also just require this.
More information about the Elfutils-devel