4 // Test block range is set.
5 // RUN
: llvm-mc
-triple
=x86_64-windows-msvc
--filetype
=obj
%s
> %t.obj
6 // RUN
: lld-link
/debug
:full
/nodefaultlib
/entry
:main
%t.obj
/out
:%t.exe
/base
:0x140000000
7 // RUN
: %lldb
%t.exe
-o
"image lookup -a 0x140001014 -v" -o
"exit" | FileCheck
%s
9 // CHECK
: Function
: id
= {{.*}}, name = "main", range = [0x0000000140001000-0x0000000140001044)
10 // CHECK-NEXT
: FuncType
: id
= {{.*}}, byte-size = 0, compiler_type = "int (void)"
11 // CHECK-NEXT
: Blocks
: id
= {{.*}}, range = [0x140001000-0x140001044)
12 // CHECK-NEXT
: id
= {{.*}}, range = [0x140001014-0x14000103b)
22 .intel_syntax noprefix
28 .globl main # -- Begin function main
33 .cv_file 1 "/tmp/blocks.cpp" "4CC0785E17ACF09C657F740775661395" 1
34 .cv_loc 0 1 1 0 # blocks.cpp:1:0
40 mov dword ptr
[rsp
+ 12], 0
42 .cv_loc 0 1 2 0 # blocks.cpp:2:0
43 mov dword ptr
[rsp
+ 8], 0
45 .cv_loc 0 1 3 0 # blocks.cpp:3:0
46 mov dword ptr
[rsp
+ 4], 0
48 # =>This Inner Loop Header: Depth=1
49 cmp dword ptr
[rsp
+ 4], 3
52 # in Loop: Header=BB0_1 Depth=1
54 .cv_loc 0 1 4 0 # blocks.cpp:4:0
55 mov eax
, dword ptr
[rsp
+ 8]
57 mov dword ptr
[rsp
+ 8], eax
60 # in Loop: Header=BB0_1 Depth=1
61 .cv_loc 0 1 3 0 # blocks.cpp:3:0
62 mov eax
, dword ptr
[rsp
+ 4]
64 mov dword ptr
[rsp
+ 4], eax
68 .cv_loc 0 1 6 0 # blocks.cpp:6:0
69 mov eax
, dword ptr
[rsp
+ 8]
76 .section .drectve,"yn"
77 .ascii " /DEFAULTLIB:libcmt.lib"
78 .ascii " /DEFAULTLIB:oldnames.lib"
79 .section .debug$S,"dr"
81 .long 4 # Debug section magic
83 .long .Ltmp7-.Ltmp6 # Subsection size
85 .short .Ltmp9-.Ltmp8 # Record length
87 .short 4353 # Record kind: S_OBJNAME
89 .asciz "/tmp/blocks.obj" # Object name
92 .short .Ltmp11-.Ltmp10 # Record length
94 .short 4412 # Record kind: S_COMPILE3
95 .long 1 # Flags and language
97 .short 16 # Frontend version
101 .short 16000 # Backend version
105 .asciz "clang version 16.0.0" # Null-terminated compiler version string
110 .long 241 # Symbol subsection for main
111 .long .Ltmp13-.Ltmp12 # Subsection size
113 .short .Ltmp15-.Ltmp14 # Record length
115 .short 4423 # Record kind: S_GPROC32_ID
119 .long .Lfunc_end0-main # Code size
120 .long 0 # Offset after prologue
121 .long 0 # Offset before epilogue
122 .long 4098 # Function type index
123 .secrel32 main # Function section relative address
124 .secidx main # Function section index
126 .asciz "main" # Function name
129 .short .Ltmp17-.Ltmp16 # Record length
131 .short 4114 # Record kind: S_FRAMEPROC
134 .long 0 # Offset of padding
135 .long 0 # Bytes of callee saved registers
136 .long 0 # Exception handler offset
137 .short 0 # Exception handler section
138 .long 81920 # Flags (defines frame register)
141 .short .Ltmp19-.Ltmp18 # Record length
143 .short 4414 # Record kind: S_LOCAL
144 .long 116 # TypeIndex
149 .cv_def_range .Ltmp0 .Ltmp5, frame_ptr_rel, 8
150 .short .Ltmp21-.Ltmp20 # Record length
152 .short 4355 # Record kind: S_BLOCK32
155 .long .Ltmp4-.Ltmp1 # Code size
156 .secrel32 .Ltmp1 # Function section relative address
157 .secidx .Lfunc_begin0 # Function section index
158 .byte 0 # Lexical block name
161 .short .Ltmp23-.Ltmp22 # Record length
163 .short 4414 # Record kind: S_LOCAL
164 .long 116 # TypeIndex
169 .cv_def_range .Ltmp1 .Ltmp4, frame_ptr_rel, 4
170 .short 2 # Record length
171 .short 6 # Record kind: S_END
172 .short 2 # Record length
173 .short 4431 # Record kind: S_PROC_ID_END
176 .cv_linetable 0, main, .Lfunc_end0
177 .cv_filechecksums # File index to string table offset subsection
178 .cv_stringtable # String table
180 .long .Ltmp25-.Ltmp24 # Subsection size
182 .short .Ltmp27-.Ltmp26 # Record length
184 .short 4428 # Record kind: S_BUILDINFO
185 .long 4104 # LF_BUILDINFO index
190 .section .debug$T,"dr"
192 .long 4 # Debug section magic
194 .short 0x6 # Record length
195 .short 0x1201 # Record kind: LF_ARGLIST
198 .short 0xe # Record length
199 .short 0x1008 # Record kind: LF_PROCEDURE
200 .long 0x74 # ReturnType: int
201 .byte 0x0 # CallingConvention: NearC
202 .byte 0x0 # FunctionOptions
203 .short 0x0 # NumParameters
204 .long 0x1000 # ArgListType: ()
206 .short 0x12 # Record length
207 .short 0x1601 # Record kind: LF_FUNC_ID
208 .long 0x0 # ParentScope
209 .long 0x1001 # FunctionType: int ()