1 ## The test checks that ranges for compile units in package files are read
2 ## correctly, i.e. the base offset in the index section is taken into account.
4 # RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o - | \
5 # RUN: llvm-dwarfdump -v -debug-info -debug-rnglists - | \
8 # CHECK: .debug_info.dwo contents:
10 # CHECK: DW_TAG_compile_unit [1]
11 # CHECK-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x1) rangelist = 0x00000022
12 # CHECK-NEXT: [0x00000005, 0x0000000f))
14 # CHECK: .debug_rnglists.dwo contents:
15 # CHECK: 0x00000000: range list header:
16 # CHECK: 0x0000000d: range list header:
17 # CHECK-NEXT: offsets: [
18 # CHECK-NEXT: 0x00000008 => 0x00000021
19 # CHECK-NEXT: 0x00000009 => 0x00000022
22 # CHECK-NEXT: 0x00000021: [DW_RLE_end_of_list]
23 # CHECK-NEXT: 0x00000022: [DW_RLE_offset_pair]: 0x00000005, 0x0000000f => [0x00000005, 0x0000000f)
24 # CHECK-NEXT: 0x00000025: [DW_RLE_end_of_list]
26 .section .debug_abbrev.dwo, "e", @progbits
28 .byte 0x01 # Abbrev code
29 .byte 0x11 # DW_TAG_compile_unit
30 .byte 0x00 # DW_CHILDREN_no
31 .byte 0x55 # DW_AT_ranges
32 .byte 0x23 # DW_FORM_rnglistx
38 .section .debug_info.dwo, "e", @progbits
40 .long .LCUEnd-.LCUVersion # Length
43 .byte 5 # DW_UT_split_compile
44 .byte 4 # Address Size (in bytes)
45 .long 0 # Offset Into Abbrev Section
46 .quad 0x1100001122222222 # DWO id
47 .uleb128 1 # Abbrev [1] DW_TAG_compile_unit
48 .uleb128 1 # DW_AT_ranges (DW_FORM_rnglistx)
51 .section .debug_rnglists.dwo,"e",@progbits
53 .long .LRLT0End-.LRLT0Version # Length
60 .byte 0 # DW_RLE_end_of_list
64 .long .LRLT1End-.LRLT1Version
67 .byte 4 # Address size
68 .byte 0 # Segment selector size
69 .long 2 # Offset entry count
71 .long .LRLT1List0-.LRLT1Base
72 .long .LRLT1List1-.LRLT1Base
74 .byte 0 # DW_RLE_end_of_list
76 .byte 4 # DW_RLE_offset_pair
77 .uleb128 5 # Starting offset
78 .uleb128 15 # Ending offset
79 .byte 0 # DW_RLE_end_of_list
82 .section .debug_cu_index, "", @progbits
86 .long 3 # Section count
89 ## Hash Table of Signatures:
90 .quad 0x1100001122222222
92 ## Parallel Table of Indexes:
95 ## Table of Section Offsets:
97 .long 1 # DW_SECT_INFO
98 .long 3 # DW_SECT_ABBREV
99 .long 8 # DW_SECT_RNGLISTS
101 .long 0 # Offset in .debug_info.dwo
102 .long 0 # Offset in .debug_abbrev.dwo
103 .long .LRLT1-.debug_rnglists.dwo # Offset in .debug_rnglists.dwo
104 ## Table of Section Sizes:
105 .long .LCUEnd-.LCU # Size in .debug_info.dwo
106 .long .LAbbrevEnd-.LAbbrev # Size in .debug_abbrev.dwo
107 .long .LRLT1End-.LRLT1 # Size in .debug_rnglists.dwo