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