[llvm] [LLVM][DWARF] Add support for .gnu_debuglink (PR #77715)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 10:23:34 PST 2024


================
@@ -127,6 +127,9 @@ class DWARFContext : public DIContext {
 
   std::unique_ptr<const DWARFObject> DObj;
 
+  /// Binary containing debug information after objcopy --only-keep-debug
+  object::OwningBinary<object::ObjectFile> GnuLink;
----------------
dwblaikie wrote:

As far as llvm's DWARF library is concerned, I /think/ we can replace the binary with the debuglink binary, though (even if it is only-keep-debug) - and that is what this patch is doing. Presumably that's what debuginfod support does too? (well, one way or another - as you say, perhaps underspecified for all these different flavors of split/partial binaries, etc - for now, I guess debuginfod support is retrieving the whole unstripped binary, so it's strictly better/more complete than the case being supported here with debuglink - but that points to, even more, that they could use the same path in this case (because the path is good enough for debuglink to only-keep-debug, so it's certainly fine to use that path for the more complete whole-unstripped-binary case for debuginfod))

https://github.com/llvm/llvm-project/pull/77715


More information about the llvm-commits mailing list