[Alignment][NFC] Instructions::getLoadStoreAlignment
[llvm-complete.git] / test / DebugInfo / X86 / dwarfdump-debug-loclists.test
blob783d4b84fbf516069bd2d8b573bdcd1c8b5ce7c8
1 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o
2 # RUN: llvm-dwarfdump -v %t.o | FileCheck %s
4 # CHECK:      .debug_info
5 # CHECK:       DW_AT_name{{.*}}"stub"
6 # CHECK:       DW_AT_location [DW_FORM_sec_offset]   (0x0000000c
7 # CHECK-NEXT:    [0x0000000000000010, 0x0000000000000020): DW_OP_breg5 RDI+0
8 # CHECK-NEXT:    [0x0000000000000530, 0x0000000000000540): DW_OP_breg6 RBP-8, DW_OP_deref
9 # CHECK-NEXT:    [0x0000000000000700, 0x0000000000000710): DW_OP_breg5 RDI+0
11 # CHECK:      .debug_loclists contents:
12 # CHECK-NEXT: 0x00000000: locations list header: length = 0x0000002c, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
13 # CHECK-NEXT: 0x0000000c:
14 # CHECK-NEXT:   DW_LLE_offset_pair (0x0000000000000000, 0x0000000000000010)
15 # CHECK-NEXT:                   => [0x0000000000000000, 0x0000000000000010): DW_OP_breg5 RDI+0
16 # CHECK-NEXT:   DW_LLE_base_address(0x0000000000000500)
17 # CHECK-NEXT:   DW_LLE_offset_pair (0x0000000000000030, 0x0000000000000040)
18 # CHECK-NEXT:                   => [0x0000000000000530, 0x0000000000000540): DW_OP_breg6 RBP-8, DW_OP_deref
19 # CHECK-NEXT:   DW_LLE_start_length(0x0000000000000700, 0x0000000000000010)
20 # CHECK-NEXT:                   => [0x0000000000000700, 0x0000000000000710): DW_OP_breg5 RDI+0
21 # CHECK-NEXT:   DW_LLE_end_of_list ()
23 .section  .debug_str,"MS",@progbits,1
24   .asciz  "stub"
26 .section  .debug_str_offsets,"",@progbits
27   .long  68
28   .short  5
29   .short  0
30 .Lstr_offsets_base0:
31   .zero 64
33 .section  .debug_loclists,"",@progbits
34   .long  .Ldebug_loclist_table_end0-.Ldebug_loclist_table_start0
35 .Ldebug_loclist_table_start0:
36  .short 5                        # Version.
37  .byte 8                         # Address size.
38  .byte 0                         # Segmen selector size.
39  .long 0                         # Offset entry count.
40 .Lloclists_table_base0:
41 .Ldebug_loc0:
42   .byte  4                       # DW_LLE_offset_pair
43   .uleb128 0x0                   #   starting offset
44   .uleb128 0x10                  #   ending offset
45   .byte  2                       # Loc expr size
46   .byte  117                     # DW_OP_breg5
47   .byte  0                       # 0
48   
49   .byte  6                       # DW_LLE_base_address
50   .quad  0x500                   # Some address
51   
52   .byte  4                       # DW_LLE_offset_pair
53   .uleb128 0x30                  #   starting offset
54   .uleb128 0x40                  #   ending offset
55   .byte  3                       # Loc expr size
56   .byte  118                     # DW_OP_breg6
57   .byte  120                     # -8
58   .byte  6                       # DW_OP_deref
60   .byte  8                       # DW_LLE_start_length
61   .quad  0x700                   # Some address
62   .uleb128 0x10                  #   length
63   .byte  2                       # Loc expr size
64   .byte  117                     # DW_OP_breg5
65   .byte  0                       # 0
66   
67   .byte  0                       # DW_LLE_end_of_list
69 .Ldebug_loclist_table_end0:
71 .section  .debug_abbrev,"",@progbits
72   .byte  1                       # Abbreviation Code
73   .byte  17                      # DW_TAG_compile_unit
74   .byte  1                       # DW_CHILDREN_yes
75   .byte  37                      # DW_AT_producer
76   .byte  37                      # DW_FORM_strx1
77   .byte  19                      # DW_AT_language
78   .byte  5                       # DW_FORM_data2
79   .byte  3                       # DW_AT_name
80   .byte  37                      # DW_FORM_strx1
81   .byte  114                     # DW_AT_str_offsets_base
82   .byte  23                      # DW_FORM_sec_offset
83   .byte  16                      # DW_AT_stmt_list
84   .byte  23                      # DW_FORM_sec_offset
85   .byte  27                      # DW_AT_comp_dir
86   .byte  37                      # DW_FORM_strx1
87   .byte  17                      # DW_AT_low_pc
88   .byte  1                       # DW_FORM_addr
89   .byte  18                      # DW_AT_high_pc
90   .byte  6                       # DW_FORM_data4
91   .ascii  "\214\001"             # DW_AT_loclists_base
92   .byte  23                      # DW_FORM_sec_offset
93   .byte  0                       # EOM(1)
94   .byte  0                       # EOM(2)
95   .byte  2                       # Abbreviation Code
96   .byte  46                      # DW_TAG_subprogram
97   .byte  1                       # DW_CHILDREN_yes
98   .byte  17                      # DW_AT_low_pc
99   .byte  1                       # DW_FORM_addr
100   .byte  18                      # DW_AT_high_pc
101   .byte  6                       # DW_FORM_data4
102   .byte  64                      # DW_AT_frame_base
103   .byte  24                      # DW_FORM_exprloc
104   .byte  110                     # DW_AT_linkage_name
105   .byte  37                      # DW_FORM_strx1
106   .byte  3                       # DW_AT_name
107   .byte  37                      # DW_FORM_strx1
108   .byte  58                      # DW_AT_decl_file
109   .byte  11                      # DW_FORM_data1
110   .byte  59                      # DW_AT_decl_line
111   .byte  11                      # DW_FORM_data1
112   .byte  63                      # DW_AT_external
113   .byte  25                      # DW_FORM_flag_present
114   .byte  0                       # EOM(1)
115   .byte  0                       # EOM(2)
116   .byte  3                       # Abbreviation Code
117   .byte  52                      # DW_TAG_variable
118   .byte  0                       # DW_CHILDREN_no
119   .byte  2                       # DW_AT_location
120   .byte  23                      # DW_FORM_sec_offset
121   .byte  3                       # DW_AT_name
122   .byte  37                      # DW_FORM_strx1
123   .byte  58                      # DW_AT_decl_file
124   .byte  11                      # DW_FORM_data1
125   .byte  59                      # DW_AT_decl_line
126   .byte  11                      # DW_FORM_data1
127   .byte  73                      # DW_AT_type
128   .byte  19                      # DW_FORM_ref4
129   .byte  0                       # EOM(1)
130   .byte  0                       # EOM(2)
131   .byte  0                       # EOM(3)
133 .section  .debug_info,"",@progbits
134 .Lcu_begin0:
135   .long  70                      # Length of Unit
136   .short  5                      # DWARF version number
137   .byte  1                       # DWARF Unit Type
138   .byte  8                       # Address Size (in bytes)
139   .long  .debug_abbrev           # Offset Into Abbrev. Section
140   .byte  1                       # Abbrev [1] 0xc:0xef DW_TAG_compile_unit
141   .byte  0                       # DW_AT_producer
142   .short  4                      # DW_AT_language
143   .byte  1                       # DW_AT_name
144   .long  .Lstr_offsets_base0     # DW_AT_str_offsets_base
145   .long  .Lline_table_start0     # DW_AT_stmt_list
146   .byte  2                       # DW_AT_comp_dir
147   .quad  0x10                    # DW_AT_low_pc
148   .long  0                       # DW_AT_high_pc
149   .long  .Lloclists_table_base0  # DW_AT_loclists_base
150   .byte  2                       # Abbrev [2] 0x2a:0x20 DW_TAG_subprogram
151   .quad  0                       # DW_AT_low_pc
152   .long  0                       # DW_AT_high_pc
153   .byte  1                       # DW_AT_frame_base
154   .byte  86
155   .byte  11                      # DW_AT_linkage_name
156   .byte  12                      # DW_AT_name
157   .byte  1                       # DW_AT_decl_file
158   .byte  6                       # DW_AT_decl_line
159                                  # DW_AT_external
160   .byte 3                        # Abbrev [3] 0x40:0xb DW_TAG_variable
161   .long .Ldebug_loc0             # DW_AT_location
162   .byte 7                        # DW_AT_name
163   .byte 1                        # DW_AT_decl_file
164   .byte 6                        # DW_AT_decl_line
165   .long 76                       # DW_AT_type
166   .byte 0                        # End Of Children Mark
167   .byte 0                        # End Of Children Mark
168   .byte  0                       # End Of Children Mark
170 .section .debug_line,"",@progbits
171 .Lline_table_start0: