[llvm] [LLVM][DWARF] Add support for .gnu_debuglink (PR #77715)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 08:02:51 PST 2024
ayermolo wrote:
> A direct alternative to `.gnu_debuglink` is the so called "build ID" method which uses the `.build-id` subdirectory of each one of the global debug directories, see https://sourceware.org/gdb/current/onlinedocs/gdb.html/Separate-Debug-Files.html for more details.
>
> In `llvm-symbolizer` for example we support both the build ID and debug link method, see
>
> https://github.com/llvm/llvm-project/blob/e611a4cf8060bf0a95b4acd9e136733425da085a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp#L520-L523
>
> I think we should factor the debug link implementation out of the symbolizer into a reusable library, similarly to what @mysterymath has done for the build ID implementation in [9812948](https://github.com/llvm/llvm-project/commit/9812948d22328e6f810c7654b93b063ce97ecfec), so it can be reused both inside the symbolizer and `DWARFContext`.
>
> In `DWARFContext` we should support both methods, especially since many ELF based systems are moving away from `.gnu_debuglink` and towards build ID (in Fuchsia for example we only support build ID).
Let me take a look at lookUpDebuglinkObject, after some internal stuff.
https://github.com/llvm/llvm-project/pull/77715
More information about the llvm-commits
mailing list