xref: /llvm-project/llvm/test/DebugInfo/X86/dwp-v2-cu-index.s (revision 7fc79340234f3acd354c52bd8bf2cf44f38fc4be)
1## The test checks that we can parse and dump a pre-standard CU index section.
2## See https://gcc.gnu.org/wiki/DebugFissionDWP for the proposal.
3
4# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o - | \
5# RUN:   llvm-dwarfdump -debug-cu-index - | \
6# RUN:   FileCheck %s
7
8# CHECK:      .debug_cu_index contents:
9# CHECK-NEXT: version = 2, units = 1, slots = 2
10# CHECK-EMPTY:
11# CHECK-NEXT: Index Signature          INFO                                     ABBREV                   LINE                     LOC                      STR_OFFSETS              MACINFO                  MACRO
12# CHECK-NEXT: ----- ------------------ ---------------------------------------- ------------------------ ------------------------ ------------------------ ------------------------ ------------------------ ------------------------
13# CHECK-NEXT:     1 0x1100001122222222 [0x0000000000001000, 0x0000000000001010) [0x00002000, 0x00002020) [0x00003000, 0x00003030) [0x00004000, 0x00004040) [0x00005000, 0x00005050) [0x00006000, 0x00006060) [0x00007000, 0x00007070)
14
15    .section .debug_cu_index, "", @progbits
16## Header:
17    .long 2             # Version
18    .long 7             # Section count
19    .long 1             # Unit count
20    .long 2             # Slot count
21## Hash Table of Signatures:
22    .quad 0x1100001122222222
23    .quad 0
24## Parallel Table of Indexes:
25    .long 1
26    .long 0
27## Table of Section Offsets:
28## Row 0:
29    .long 1             # DW_SECT_INFO
30    .long 3             # DW_SECT_ABBREV
31    .long 4             # DW_SECT_LINE
32    .long 5             # DW_SECT_LOC
33    .long 6             # DW_SECT_STR_OFFSETS
34    .long 7             # DW_SECT_MACINFO
35    .long 8             # DW_SECT_MACRO
36## Row 1:
37    .long 0x1000        # Offset in .debug_info.dwo
38    .long 0x2000        # Offset in .debug_abbrev.dwo
39    .long 0x3000        # Offset in .debug_line.dwo
40    .long 0x4000        # Offset in .debug_loc.dwo
41    .long 0x5000        # Offset in .debug_str_offsets.dwo
42    .long 0x6000        # Offset in .debug_macinfo.dwo
43    .long 0x7000        # Offset in .debug_macro.dwo
44## Table of Section Sizes:
45    .long 0x10          # Size in .debug_info.dwo
46    .long 0x20          # Size in .debug_abbrev.dwo
47    .long 0x30          # Size in .debug_line.dwo
48    .long 0x40          # Size in .debug_loc.dwo
49    .long 0x50          # Size in .debug_str_offsets.dwo
50    .long 0x60          # Size in .debug_macinfo.dwo
51    .long 0x70          # Size in .debug_macro.dwo
52