[lld] [lld][ELF] Add --debug-names to create merged .debug_names. (PR #86508)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 14 20:54:26 PDT 2024


================
@@ -1,10 +1,10 @@
-# This file was generated by first compiling main.cpp:
-# clang++ -g -O0 -S -gpubnames -fdebug-compilation-dir='debug-names-test' \
-#      main.cpp
+# This file was generated by first compiling a.cpp:
+# clang++ -g -O0 -S -gpubnames -fdebug-compilation-dir='/proc/self/cwd' a.cpp
+
 # Then manually edit the .debug_names section. In the entries, change the
 # size of the DW_IDX_die_offset from '.long' to '.byte'.
 
-# Contents of main.cpp:
+# Contents of a.cpp:
 # int main (int argc, char **argv) { }
----------------
dwblaikie wrote:

Probably simpler DWARF without the parameters (`int main() { }`) - or, even better (if it gets far enough through lld, with `void f1() { }`, but lld might bail out too early for that)

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


More information about the llvm-commits mailing list