[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / bolt / test / X86 / dwarf5-debug-info-dwarf4-debug-line.s
blob6042bbee8948c7028888e273f2c091a51a02af9b
1 # REQUIRES: system-linux
3 # RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o
4 # RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q
5 # RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6 # RUN: llvm-dwarfdump --show-form --verbose --debug-line %t.exe | FileCheck --check-prefix=PRECHECK %s
7 # RUN: llvm-dwarfdump --show-form --verbose --debug-line %t.bolt | FileCheck --check-prefix=POSTCHECK %s
9 # This test checks that .debug_line gets generated correctly when .debug_info is DWARF5, and .debug_line is DWARF4.
11 # PRECHECK: version: 4
12 # PRECHECK: file_names[ 1]:
13 # PRECHECK-NEXT: name: "main.cpp"
14 # PRECHECK-NEXT: dir_index: 0
15 # PRECHECK-NEXT: mod_time: 0x00000000
16 # PRECHECK-NEXT: length: 0x00000000
18 # POSTCHECK: version: 4
19 # POSTCHECK: file_names[ 1]:
20 # POSTCHECK-NEXT: name: "main.cpp"
21 # POSTCHECK-NEXT: dir_index: 0
22 # POSTCHECK-NEXT: mod_time: 0x00000000
23 # POSTCHECK-NEXT: length: 0x00000000
25 # int main() {
26 # return 0;
27 # }
30 .file "main.cpp"
31 .text
32 .Ltext0:
33 .globl main
34 .type main, @function
35 main:
36 .LFB0:
37 .file 1 "main.cpp"
38 .loc 1 1 12
39 .cfi_startproc
40 pushq %rbp
41 .cfi_def_cfa_offset 16
42 .cfi_offset 6, -16
43 movq %rsp, %rbp
44 .cfi_def_cfa_register 6
45 .loc 1 2 10
46 movl $0, %eax
47 .loc 1 3 1
48 popq %rbp
49 .cfi_def_cfa 7, 8
50 ret
51 .cfi_endproc
52 .LFE0:
53 .size main, .-main
54 .Letext0:
55 .section .debug_info,"",@progbits
56 .Ldebug_info0:
57 .long 0x50
58 .value 0x5
59 .byte 0x1
60 .byte 0x8
61 .long .Ldebug_abbrev0
62 .uleb128 0x1
63 .long .LASF0
64 .byte 0x21
65 .long .LASF1
66 .long .LASF2
67 .quad .Ltext0
68 .quad .Letext0-.Ltext0
69 .long .Ldebug_line0
70 .uleb128 0x2
71 .long .LASF3
72 .byte 0x1
73 .byte 0x1
74 .byte 0x5
75 .long 0x4c
76 .quad .LFB0
77 .quad .LFE0-.LFB0
78 .uleb128 0x1
79 .byte 0x9c
80 .uleb128 0x3
81 .byte 0x4
82 .byte 0x5
83 .string "int"
84 .byte 0
85 .section .debug_abbrev,"",@progbits
86 .Ldebug_abbrev0:
87 .uleb128 0x1
88 .uleb128 0x11
89 .byte 0x1
90 .uleb128 0x25
91 .uleb128 0xe
92 .uleb128 0x13
93 .uleb128 0xb
94 .uleb128 0x3
95 .uleb128 0xe
96 .uleb128 0x1b
97 .uleb128 0xe
98 .uleb128 0x11
99 .uleb128 0x1
100 .uleb128 0x12
101 .uleb128 0x7
102 .uleb128 0x10
103 .uleb128 0x17
104 .byte 0
105 .byte 0
106 .uleb128 0x2
107 .uleb128 0x2e
108 .byte 0
109 .uleb128 0x3f
110 .uleb128 0x19
111 .uleb128 0x3
112 .uleb128 0xe
113 .uleb128 0x3a
114 .uleb128 0xb
115 .uleb128 0x3b
116 .uleb128 0xb
117 .uleb128 0x39
118 .uleb128 0xb
119 .uleb128 0x49
120 .uleb128 0x13
121 .uleb128 0x11
122 .uleb128 0x1
123 .uleb128 0x12
124 .uleb128 0x7
125 .uleb128 0x40
126 .uleb128 0x18
127 .uleb128 0x7a
128 .uleb128 0x19
129 .byte 0
130 .byte 0
131 .uleb128 0x3
132 .uleb128 0x24
133 .byte 0
134 .uleb128 0xb
135 .uleb128 0xb
136 .uleb128 0x3e
137 .uleb128 0xb
138 .uleb128 0x3
139 .uleb128 0x8
140 .byte 0
141 .byte 0
142 .byte 0
143 .section .debug_aranges,"",@progbits
144 .long 0x2c
145 .value 0x2
146 .long .Ldebug_info0
147 .byte 0x8
148 .byte 0
149 .value 0
150 .value 0
151 .quad .Ltext0
152 .quad .Letext0-.Ltext0
153 .quad 0
154 .quad 0
155 .section .debug_line,"",@progbits
156 .Ldebug_line0:
157 .section .debug_str,"MS",@progbits,1
158 .LASF0:
159 .string "GNU C++14 8.5.0 20210514 (Red Hat 8.5.0-3) -mtune=generic -march=x86-64 -g2 -gdwarf-5"
160 .LASF1:
161 .string "main.cpp"
162 .LASF3:
163 .string "main"
164 .LASF2:
165 .string "."
166 .ident "GCC: (GNU) 8.5.0 20210514 (Red Hat 8.5.0-3)"
167 .section .note.GNU-stack,"",@progbits