[llvm] Fix merging of debug_str_offsets with multiple contributions (PR #90461)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 10:36:34 PDT 2024
================
@@ -0,0 +1,161 @@
+RUN: rm -rf %t && split-file %s %t && cd %t
+RUN: llc a.ll -o a.o -filetype=obj --split-dwarf-output=a.dwo --split-dwarf-file=a.dwo
+RUN: llc b.ll -o b.o -filetype=obj --split-dwarf-output=b.dwo --split-dwarf-file=b.dwo
+RUN: llc c.ll -o c.o -filetype=obj --split-dwarf-output=c.dwo --split-dwarf-file=c.dwo
+RUN: llvm-dwp a.dwo b.dwo -o ab.dwp
+RUN: llvm-dwp c.dwo ab.dwp -o merged.dwp
+RUN: llvm-dwarfdump -v merged.dwp | FileCheck --check-prefix=CHECK %s
+
+CHECK-LABEL: .debug_abbrev.dwo contents:
+CHECK-LABEL: Abbrev table for offset:
+CHECK: 0x0000[[CAOFF:.*]]
+CHECK-LABEL: Abbrev table for offset:
+CHECK: 0x0000[[AAOFF:.*]]
+CHECK-LABEL: Abbrev table for offset:
+CHECK: 0x0000[[BAOFF:.*]]
+
+CHECK: .debug_info.dwo contents:
+CHECK: 0x[[#%.8x,COFF:]]:
+CHECK-LABEL: Compile Unit: length = {{.*}}, format = DWARF32, version = 0x0005, unit_type = DW_UT_split_compile, abbr_offset =
+CHECK: 0x[[CAOFF]], addr_size = 0x08, DWO_id = 0x[[DWOC:.*]] (next unit at 0x[[#%.8x,BOFF:]])
+CHECK: [[#BOFF]]:
+CHECK-LABEL: Compile Unit: length = {{.*}}, format = DWARF32, version = 0x0005, unit_type = DW_UT_split_compile, abbr_offset =
+CHECK: 0x[[BAOFF]], addr_size = 0x08, DWO_id = 0x[[DWOB:.*]] (next unit at 0x[[#%.8x,AOFF:]])
+CHECK: [[#AOFF]]:
+CHECK-LABEL: Compile Unit: length = {{.*}}, format = DWARF32, version = 0x0005, unit_type = DW_UT_split_compile, abbr_offset =
+CHECK: 0x[[AAOFF]], addr_size = 0x08, DWO_id = 0x[[DWOA:.*]] (next unit at 0x[[#%.8x,XOFF:]])
+
----------------
dwblaikie wrote:
Given that the DWP tool doesn't modify the abbrev and info sections at all, probably omit these from the check? The dump of just the str_offsets section is, I think, enoguh to demonstrate the issue/fix, yeah?
https://github.com/llvm/llvm-project/pull/90461
More information about the llvm-commits
mailing list