xref: /llvm-project/llvm/test/tools/llvm-dwp/X86/rnglists.s (revision 7fc79340234f3acd354c52bd8bf2cf44f38fc4be)
1# This test checks if llvm-dwp outputs .debug_rnglists.
2
3# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o \
4# RUN:         -split-dwarf-file=%t.dwo -dwarf-version=5
5# RUN: llvm-dwp %t.dwo -o %t.dwp
6# RUN: llvm-dwarfdump -debug-rnglists -debug-cu-index -debug-tu-index %t.dwp | FileCheck %s
7
8# CHECK-DAG: .debug_cu_index contents:
9# CHECK: Index Signature          INFO                         ABBREV                   RNGLISTS
10# CHECK:     1 {{.*}} [0x0000000000000018, 0x000000000000002d) [0x00000000, 0x00000004) [0x00000000, 0x00000017)
11
12# CHECK-DAG: .debug_tu_index contents:
13# CHECK: Index Signature          INFO                         ABBREV                   RNGLISTS
14# CHECK:     2 {{.*}} [0x0000000000000000, 0x0000000000000018) [0x00000000, 0x00000004) [0x00000000, 0x00000017)
15
16# CHECK-DAG: .debug_rnglists.dwo contents:
17# range list header: length = 0x00000013, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000001
18# CHECK: offsets: [
19# CHECK-NEXT: 0x00000004
20# CHECK-NEXT: ]
21# CHECK-NEXT: ranges:
22# CHECK-NEXT: [0x0000000000000004, 0x0000000000000008)
23# CHECK-NEXT: [0x000000000000000c, 0x0000000000000010)
24
25	.section	.debug_info.dwo,"e",@progbits
26	.long	.Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
27.Ldebug_info_dwo_start0:
28	.short	5                               # DWARF version number
29	.byte	6                               # DWARF Unit Type
30	.byte	8                               # Address Size (in bytes)
31	.long	0                               # Offset Into Abbrev. Section
32	.quad	-4287463584810542331            # Type Signature
33	.long	31                              # Type DIE Offset
34.Ldebug_info_dwo_end0:
35	.section	.debug_info.dwo,"e",@progbits
36	.long	.Ldebug_info_dwo_end3-.Ldebug_info_dwo_start3 # Length of Unit
37.Ldebug_info_dwo_start3:
38	.short	5                               # DWARF version number
39	.byte	5                               # DWARF Unit Type
40	.byte	8                               # Address Size (in bytes)
41	.long	0                               # Offset Into Abbrev. Section
42	.quad	1152943841751211454
43	.byte	1                              # Abbrev [1] 0x14:0x349 DW_TAG_compile_unit
44.Ldebug_info_dwo_end3:
45	.section	.debug_abbrev.dwo,"e",@progbits
46	.byte	1                              # Abbreviation Code
47	.byte	17                              # DW_TAG_compile_unit
48	.byte	0                               # DW_CHILDREN_no
49	.byte	0                               # EOM(1)
50	.section	.debug_rnglists.dwo,"e",@progbits
51	.long	.Ldebug_list_header_end1-.Ldebug_list_header_start1 # Length
52.Ldebug_list_header_start1:
53	.short	5                               # Version
54	.byte	8                               # Address size
55	.byte	0                               # Segment selector size
56	.long	1                               # Offset entry count
57.Lrnglists_dwo_table_base0:
58	.long	.Ldebug_ranges0-.Lrnglists_dwo_table_base0
59.Ldebug_ranges0:
60	.byte	4                               # DW_RLE_offset_pair
61	.uleb128 4                            #   starting offset
62	.uleb128 8                            #   ending offset
63	.byte	4                               # DW_RLE_offset_pair
64	.uleb128 12                           #   starting offset
65	.uleb128 16                           #   ending offset
66	.byte	0                               # DW_RLE_end_of_list
67.Ldebug_list_header_end1:
68