4 # RUN: llvm-mc -triple=x86_64-windows-msvc --filetype=obj %s > %t.obj
5 # RUN: lld-link /debug:full /nodefaultlib /entry:main %t.obj /out:%t.exe /base:0x140000000
6 # RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
7 # RUN: %p/Inputs/local-variables-registers.lldbinit 2>&1 | FileCheck %s
9 # This file is compiled from following source file:
10 # clang-cl /Z7 /O1 /Falocal-variables-registers.s a.cpp
16 # __attribute__((noinline)) S CreateS(int p1, char p2) {
25 # int main(int argc, char** argv) {
26 # int local = argc * 2;
27 # S s = CreateS(local, 'a');
31 # FIXME: The following variable location have wrong register numbers due to
32 # https://github.com/llvm/llvm-project/issues/53575. Fix them after resolving
35 # CHECK: (lldb) image lookup -a 0x140001000 -v
36 # CHECK: LineEntry: [0x0000000140001000-0x0000000140001003): C:\src\test\a.cpp:10
37 # CHECK-NEXT: Variable: id = {{.*}}, name = "p1", type = "int", valid ranges = <block>, location = [0x0000000140001000, 0x0000000140001003) -> DW_OP_reg26 XMM9
38 # CHECK-NEXT: Variable: id = {{.*}}, name = "p2", type = "char", valid ranges = <block>, location = [0x0000000140001000, 0x0000000140001006) -> DW_OP_regx 0x3f
40 # CHECK: (lldb) image lookup -a 0x140001003 -v
41 # CHECK: LineEntry: [0x0000000140001003-0x0000000140001006): C:\src\test\a.cpp:11
42 # CHECK-NEXT: Variable: id = {{.*}}, name = "p2", type = "char", valid ranges = <block>, location = [0x0000000140001000, 0x0000000140001006) -> DW_OP_regx 0x3f
43 # CHECK-NEXT: Variable: id = {{.*}}, name = "s", type = "S", valid ranges = <block>, location = [0x0000000140001003, 0x0000000140001006) -> DW_OP_piece 0x4, DW_OP_regx 0x3f, DW_OP_piece 0x1, DW_OP_piece 0x3
45 # CHECK: (lldb) image lookup -a 0x140001006 -v
46 # CHECK: LineEntry: [0x0000000140001006-0x0000000140001011): C:\src\test\a.cpp:12
47 # CHECK-NEXT: Variable: id = {{.*}}, name = "s", type = "S", valid ranges = <block>, location = [0x0000000140001006, 0x0000000140001011) -> DW_OP_reg26 XMM9, DW_OP_piece 0x4, DW_OP_regx 0x3f, DW_OP_piece 0x1, DW_OP_piece 0x3
49 # CHECK: (lldb) image lookup -a 0x140001011 -v
50 # CHECK: LineEntry: [0x0000000140001011-0x0000000140001015): C:\src\test\a.cpp:15
51 # CHECK-NEXT: Variable: id = {{.*}}, name = "argc", type = "int", valid ranges = <block>, location = [0x0000000140001011, 0x0000000140001017) -> DW_OP_reg26 XMM9
52 # CHECK-NEXT: Variable: id = {{.*}}, name = "argv", type = "char **", valid ranges = <block>, location = [0x0000000140001011, 0x0000000140001019) -> DW_OP_reg3 RBX
54 # CHECK: (lldb) image lookup -a 0x140001017 -v
55 # CHECK: LineEntry: [0x0000000140001017-0x000000014000101e): C:\src\test\a.cpp:17
56 # CHECK-NEXT: Variable: id = {{.*}}, name = "argv", type = "char **", valid ranges = <block>, location = [0x0000000140001011, 0x0000000140001019) -> DW_OP_reg3 RBX
57 # CHECK-NEXT: Variable: id = {{.*}}, name = "local", type = "int", valid ranges = <block>, location = [0x0000000140001017, 0x000000014000101e) -> DW_OP_reg26 XMM9
59 # CHECK: (lldb) image lookup -a 0x140001019 -v
60 # CHECK: LineEntry: [0x0000000140001017-0x000000014000101e): C:\src\test\a.cpp:17
61 # CHECK-NEXT: Variable: id = {{.*}}, name = "local", type = "int", valid ranges = <block>, location = [0x0000000140001017, 0x000000014000101e) -> DW_OP_reg26 XMM9
63 # CHECK: (lldb) image lookup -a 0x14000101e -v
64 # CHECK: LineEntry: [0x000000014000101e-0x0000000140001031): C:\src\test\a.cpp:18
65 # CHECK-NEXT: Variable: id = {{.*}}, name = "s", type = "S", valid ranges = <block>, location = [0x000000014000101e, 0x000000014000102c) -> DW_OP_reg24 XMM7, DW_OP_piece 0x4, DW_OP_piece 0x4
67 # CHECK: (lldb) image lookup -a 0x14000102c -v
68 # CHECK: LineEntry: [0x000000014000101e-0x0000000140001031): C:\src\test\a.cpp:18
77 .intel_syntax noprefix
79 .def "?CreateS@@YA?AUS@@HD@Z";
83 .section .text,"xr",one_only,"?CreateS@@YA?AUS@@HD@Z"
84 .globl "?CreateS@@YA?AUS@@HD@Z" # -- Begin function ?CreateS@@YA?AUS@@HD@Z
85 "?CreateS@@YA?AUS@@HD@Z": # @"?CreateS@@YA?AUS@@HD@Z"
89 #DEBUG_VALUE: CreateS:p2 <- $dl
90 #DEBUG_VALUE: CreateS:p1 <- $ecx
91 #DEBUG_VALUE: CreateS:s <- [DW_OP_plus_uconst 1, DW_OP_stack_value, DW_OP_LLVM_fragment 0 32] $ecx
92 #DEBUG_VALUE: CreateS:s <- [DW_OP_plus_uconst 2, DW_OP_stack_value, DW_OP_LLVM_fragment 32 8] $dl
93 .cv_file 1 "C:\\src\\test\\a.cpp" "446925B46C8C870B01708834F4813A31" 1
94 .cv_loc 0 1 10 0 # a.cpp:10:0
95 # kill: def $ecx killed $ecx def $rcx
96 #DEBUG_VALUE: CreateS:s <- [DW_OP_plus_uconst 1, DW_OP_stack_value, DW_OP_LLVM_fragment 0 32] $ecx
99 #DEBUG_VALUE: CreateS:p1 <- [DW_OP_LLVM_entry_value 1] $ecx
100 #DEBUG_VALUE: CreateS:s <- [DW_OP_LLVM_fragment 0 32] $ecx
101 .cv_loc 0 1 11 0 # a.cpp:11:0
104 #DEBUG_VALUE: CreateS:p2 <- [DW_OP_LLVM_entry_value 1] $dl
105 #DEBUG_VALUE: CreateS:s <- [DW_OP_LLVM_fragment 32 8] $dl
106 .cv_loc 0 1 12 0 # a.cpp:12:0
118 .section .text,"xr",one_only,main
119 .globl main # -- Begin function main
123 .cv_loc 1 1 15 0 # a.cpp:15:0
126 #DEBUG_VALUE: main:argv <- $rdx
127 #DEBUG_VALUE: main:argc <- $ecx
132 .cv_loc 1 1 16 0 # a.cpp:16:0
135 #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $ecx
136 #DEBUG_VALUE: main:local <- $ecx
137 .cv_loc 1 1 17 0 # a.cpp:17:0
140 #DEBUG_VALUE: main:argv <- [DW_OP_LLVM_entry_value 1] $rdx
141 call
"?CreateS@@YA?AUS@@HD@Z"
143 #DEBUG_VALUE: main:s <- [DW_OP_LLVM_fragment 0 32] $eax
144 #DEBUG_VALUE: main:s <- [DW_OP_constu 40, DW_OP_shr, DW_OP_LLVM_convert 64 7, DW_OP_LLVM_convert 24 7, DW_OP_stack_value, DW_OP_LLVM_fragment 40 24] $rax
145 #DEBUG_VALUE: main:s <- [DW_OP_constu 32, DW_OP_shr, DW_OP_LLVM_convert 64 7, DW_OP_LLVM_convert 8 7, DW_OP_stack_value, DW_OP_LLVM_fragment 32 8] $rax
146 .cv_loc 1 1 18 0 # a.cpp:18:0
155 # Manually created for testing purpose.
157 .cv_loc 1 1 1000 0 # a.cpp:1000:0
164 .cv_loc 1 1 1001 0 # a.cpp:1001:0
179 .cv_loc 1 1 1002 0 # a.cpp:1002:0
200 .cv_loc 1 1 1003 0 # a.cpp:1003:0
219 .cv_loc 1 1 1004 0 # a.cpp:1004:0
228 .section .drectve,"yn"
229 .ascii " /DEFAULTLIB:libcmt.lib"
230 .ascii " /DEFAULTLIB:oldnames.lib"
231 .section .debug$S,"dr"
233 .long 4 # Debug section magic
235 .long .Ltmp10-.Ltmp9 # Subsection size
237 .short .Ltmp12-.Ltmp11 # Record length
239 .short 4412 # Record kind: S_COMPILE3
240 .long 1 # Flags and language
242 .short 13 # Frontend version
246 .short 13000 # Backend version
250 .asciz "clang version 13.0.0" # Null-terminated compiler version string
255 .section .debug$S,"dr",associative,"?CreateS@@YA?AUS@@HD@Z"
257 .long 4 # Debug section magic
258 .long 241 # Symbol subsection for CreateS
259 .long .Ltmp14-.Ltmp13 # Subsection size
261 .short .Ltmp16-.Ltmp15 # Record length
263 .short 4423 # Record kind: S_GPROC32_ID
267 .long .Lfunc_end0-"?CreateS@@YA?AUS@@HD@Z" # Code size
268 .long 0 # Offset after prologue
269 .long 0 # Offset before epilogue
270 .long 4103 # Function type index
271 .secrel32 "?CreateS@@YA?AUS@@HD@Z" # Function section relative address
272 .secidx "?CreateS@@YA?AUS@@HD@Z" # Function section index
274 .asciz "CreateS" # Function name
277 .short .Ltmp18-.Ltmp17 # Record length
279 .short 4114 # Record kind: S_FRAMEPROC
282 .long 0 # Offset of padding
283 .long 0 # Bytes of callee saved registers
284 .long 0 # Exception handler offset
285 .short 0 # Exception handler section
286 .long 0 # Flags (defines frame register)
289 .short .Ltmp20-.Ltmp19 # Record length
291 .short 4414 # Record kind: S_LOCAL
292 .long 116 # TypeIndex
297 .cv_def_range .Lfunc_begin0 .Ltmp0, reg, 18
298 .short .Ltmp22-.Ltmp21 # Record length
300 .short 4414 # Record kind: S_LOCAL
301 .long 112 # TypeIndex
306 .cv_def_range .Lfunc_begin0 .Ltmp1, reg, 3
307 .short .Ltmp24-.Ltmp23 # Record length
309 .short 4414 # Record kind: S_LOCAL
310 .long 4100 # TypeIndex
315 # The following .cv_def_range order is inverted on purpose for testing.
316 .cv_def_range .Ltmp0 .Lfunc_end0, subfield_reg, 3, 4
317 .cv_def_range .Ltmp1 .Lfunc_end0, subfield_reg,18, 0
318 .short 2 # Record length
319 .short 4431 # Record kind: S_PROC_ID_END
322 .cv_linetable 0, "?CreateS@@YA?AUS@@HD@Z", .Lfunc_end0
323 .section .debug$S,"dr",associative,main
325 .long 4 # Debug section magic
326 .long 241 # Symbol subsection for main
327 .long .Ltmp26-.Ltmp25 # Subsection size
329 .short .Ltmp28-.Ltmp27 # Record length
331 .short 4423 # Record kind: S_GPROC32_ID
335 .long .Lfunc_end1-main # Code size
336 .long 0 # Offset after prologue
337 .long 0 # Offset before epilogue
338 .long 4107 # Function type index
339 .secrel32 main # Function section relative address
340 .secidx main # Function section index
342 .asciz "main" # Function name
345 .short .Ltmp30-.Ltmp29 # Record length
347 .short 4114 # Record kind: S_FRAMEPROC
350 .long 0 # Offset of padding
351 .long 0 # Bytes of callee saved registers
352 .long 0 # Exception handler offset
353 .short 0 # Exception handler section
354 .long 81920 # Flags (defines frame register)
357 .short .Ltmp32-.Ltmp31 # Record length
359 .short 4414 # Record kind: S_LOCAL
360 .long 116 # TypeIndex
365 .cv_def_range .Lfunc_begin1 .Ltmp4, reg, 18
366 .short .Ltmp34-.Ltmp33 # Record length
368 .short 4414 # Record kind: S_LOCAL
369 .long 4104 # TypeIndex
374 .cv_def_range .Lfunc_begin1 .Ltmp5, reg, 331
375 .short .Ltmp36-.Ltmp35 # Record length
377 .short 4414 # Record kind: S_LOCAL
378 .long 116 # TypeIndex
383 .cv_def_range .Ltmp4 .Ltmp6, reg, 18
384 .short .Ltmp38-.Ltmp37 # Record length
386 .short 4414 # Record kind: S_LOCAL
387 .long 4100 # TypeIndex
392 .cv_def_range .Ltmp6 .Ltmp7, subfield_reg, 17, 0
393 .short .Ltmp101-.Ltmp100
394 # Manually created debug info for testing purpose.
395 # 1. Test non-overlapped ranges.
397 .short 4414 # Record kind: S_LOCAL
398 .long 4109 # TypeIndex
400 .asciz "non_overlapped_ranges"
403 .cv_def_range .L31 .L32, reg, 331
404 .cv_def_range .L32 .L33, reg, 330
405 .cv_def_range .L33 .L34, reg, 336
406 .short .Ltmp103-.Ltmp102
407 # CHECK: (lldb) image lookup -a 0x140001031 -v
408 # CHECK: LineEntry: [0x0000000140001031-0x0000000140001034): C:\src\test\a.cpp:1000
409 # CHECK-NEXT: Variable: id = {{.*}}, name = "non_overlapped_ranges", type = "S1", valid ranges = <block>, location = [0x0000000140001031, 0x0000000140001032) -> DW_OP_reg3 RBX
411 # CHECK: (lldb) image lookup -a 0x140001032 -v
412 # CHECK: LineEntry: [0x0000000140001031-0x0000000140001034): C:\src\test\a.cpp:1000
413 # CHECK-NEXT: Variable: id = {{.*}}, name = "non_overlapped_ranges", type = "S1", valid ranges = <block>, location = [0x0000000140001032, 0x0000000140001033) -> DW_OP_reg2 RCX
415 # CHECK: (lldb) image lookup -a 0x140001033 -v
416 # CHECK: LineEntry: [0x0000000140001031-0x0000000140001034): C:\src\test\a.cpp:1000
417 # CHECK-NEXT: Variable: id = {{.*}}, name = "non_overlapped_ranges", type = "S1", valid ranges = <block>, location = [0x0000000140001033, 0x0000000140001034) -> DW_OP_reg8 R8
420 # 2. Test overlapped subfield ranges at different offsets.
422 .short 4414 # Record kind: S_LOCAL
423 .long 4109 # TypeIndex
425 .asciz "overlapped_subfield_ranges"
428 .cv_def_range .L34 .L36, subfield_reg, 3, 0
429 .cv_def_range .L35 .L37, subfield_reg, 17, 4
430 .cv_def_range .L37 .L39, subfield_reg, 18, 4
431 .short .Ltmp105-.Ltmp104
432 # CHECK: (lldb) image lookup -a 0x140001034 -v
433 # CHECK: LineEntry: [0x0000000140001034-0x000000014000103b): C:\src\test\a.cpp:1001
434 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_subfield_ranges", type = "S1", valid ranges = <block>, location = [0x0000000140001034, 0x0000000140001035) -> DW_OP_regx 0x3f, DW_OP_piece 0x1, DW_OP_piece 0x7
436 # CHECK: (lldb) image lookup -a 0x140001035 -v
437 # CHECK: LineEntry: [0x0000000140001034-0x000000014000103b): C:\src\test\a.cpp:1001
438 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_subfield_ranges", type = "S1", valid ranges = <block>, location = [0x0000000140001035, 0x0000000140001036) -> DW_OP_regx 0x3f, DW_OP_piece 0x1, DW_OP_piece 0x3, DW_OP_reg24 XMM7, DW_OP_piece 0x4
440 # CHECK: (lldb) image lookup -a 0x140001036 -v
441 # CHECK: LineEntry: [0x0000000140001034-0x000000014000103b): C:\src\test\a.cpp:1001
442 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_subfield_ranges", type = "S1", valid ranges = <block>, location = [0x0000000140001036, 0x0000000140001037) -> DW_OP_piece 0x4, DW_OP_reg24 XMM7, DW_OP_piece 0x4
444 # CHECK: (lldb) image lookup -a 0x140001037 -v
445 # CHECK: LineEntry: [0x0000000140001034-0x000000014000103b): C:\src\test\a.cpp:1001
446 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_subfield_ranges", type = "S1", valid ranges = <block>, location = [0x0000000140001037, 0x0000000140001039) -> DW_OP_piece 0x4, DW_OP_reg26 XMM9, DW_OP_piece 0x4
449 # 3. Test overlapped ranges for the whole value.
451 .short 4414 # Record kind: S_LOCAL
452 .long 4109 # TypeIndex
454 .asciz "overlapped_ranges_2"
457 .cv_def_range .L3b .L3d, reg, 331
458 .cv_def_range .L3c .L3e, reg, 330
459 .cv_def_range .L3f .L44, reg, 339
460 .cv_def_range .L41 .L43, reg, 328
461 .short .Ltmp107-.Ltmp106
462 # CHECK: (lldb) image lookup -a 0x14000103b -v
463 # CHECK: LineEntry: [0x000000014000103b-0x0000000140001045): C:\src\test\a.cpp:1002
464 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_2", type = "S1", valid ranges = <block>, location = [0x000000014000103b, 0x000000014000103c) -> DW_OP_reg3 RBX
466 # CHECK: (lldb) image lookup -a 0x14000103d -v
467 # CHECK: LineEntry: [0x000000014000103b-0x0000000140001045): C:\src\test\a.cpp:1002
468 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_2", type = "S1", valid ranges = <block>, location = [0x000000014000103c, 0x000000014000103e) -> DW_OP_reg2 RCX
470 # CHECK: (lldb) image lookup -a 0x14000103f -v
471 # CHECK: LineEntry: [0x000000014000103b-0x0000000140001045): C:\src\test\a.cpp:1002
472 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_2", type = "S1", valid ranges = <block>, location = [0x000000014000103f, 0x0000000140001041) -> DW_OP_reg11 R11
474 # CHECK: (lldb) image lookup -a 0x140001041 -v
475 # CHECK: LineEntry: [0x000000014000103b-0x0000000140001045): C:\src\test\a.cpp:1002
476 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_2", type = "S1", valid ranges = <block>, location = [0x0000000140001041, 0x0000000140001043) -> DW_OP_reg0 RAX
478 # CHECK: (lldb) image lookup -a 0x140001043 -v
479 # CHECK: LineEntry: [0x000000014000103b-0x0000000140001045): C:\src\test\a.cpp:1002
480 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_2", type = "S1", valid ranges = <block>, location = [0x0000000140001043, 0x0000000140001044) -> DW_OP_reg11 R11
483 # 4. Test overlapped ranges for both subfield and whole value.
485 .short 4414 # Record kind: S_LOCAL
486 .long 4109 # TypeIndex
488 .asciz "overlapped_ranges_3"
491 # The following two lines result:
492 # [.L45, .L46) -> value at offset 0 is at reg 3.
493 # [.L46, .L49) -> value at offset 0 is at reg 3 and value at offset 4 is at reg 17.
494 # [.L49, .L4a) -> value at offset 4 is at reg 17.
495 .cv_def_range .L46 .L4a, subfield_reg, 17, 4
496 .cv_def_range .L45 .L49, subfield_reg, 3, 0
497 # The following overwrites range [.L47, .L48) and [.L49 .L4a) because whole
498 # value location is preferred over composited value locations.
499 .cv_def_range .L47 .L48, reg, 331
500 .cv_def_range .L49 .L4a, reg, 328
501 # For the same reason, reg 330 wins in following example.
502 .cv_def_range .L4b .L4e, reg, 330
503 .cv_def_range .L4b .L4d, subfield_reg, 17, 4
504 .cv_def_range .L4c .L4e, subfield_reg, 3, 0
505 .short .Ltmp109-.Ltmp108
506 # CHECK: (lldb) image lookup -a 0x140001045 -v
507 # CHECK: LineEntry: [0x0000000140001045-0x000000014000104e): C:\src\test\a.cpp:1003
508 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_3", type = "S1", valid ranges = <block>, location = [0x0000000140001045, 0x0000000140001046) -> DW_OP_regx 0x3f, DW_OP_piece 0x1, DW_OP_piece 0x7
510 # CHECK: (lldb) image lookup -a 0x140001046 -v
511 # CHECK: LineEntry: [0x0000000140001045-0x000000014000104e): C:\src\test\a.cpp:1003
512 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_3", type = "S1", valid ranges = <block>, location = [0x0000000140001046, 0x0000000140001047) -> DW_OP_regx 0x3f, DW_OP_piece 0x1, DW_OP_piece 0x3, DW_OP_reg24 XMM7, DW_OP_piece 0x4
514 # CHECK: (lldb) image lookup -a 0x140001047 -v
515 # CHECK: LineEntry: [0x0000000140001045-0x000000014000104e): C:\src\test\a.cpp:1003
516 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_3", type = "S1", valid ranges = <block>, location = [0x0000000140001047, 0x0000000140001048) -> DW_OP_reg3 RBX
518 # CHECK: (lldb) image lookup -a 0x140001048 -v
519 # CHECK: LineEntry: [0x0000000140001045-0x000000014000104e): C:\src\test\a.cpp:1003
520 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_3", type = "S1", valid ranges = <block>, location = [0x0000000140001048, 0x0000000140001049) -> DW_OP_regx 0x3f, DW_OP_piece 0x1, DW_OP_piece 0x3, DW_OP_reg24 XMM7, DW_OP_piece 0x4
522 # CHECK: (lldb) image lookup -a 0x140001049 -v
523 # CHECK: LineEntry: [0x0000000140001045-0x000000014000104e): C:\src\test\a.cpp:1003
524 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_3", type = "S1", valid ranges = <block>, location = [0x0000000140001049, 0x000000014000104a) -> DW_OP_reg0 RAX
526 # CHECK: (lldb) image lookup -a 0x14000104a -v
527 # CHECK: LineEntry: [0x0000000140001045-0x000000014000104e): C:\src\test\a.cpp:1003
529 # CHECK: (lldb) image lookup -a 0x14000104b -v
530 # CHECK: LineEntry: [0x0000000140001045-0x000000014000104e): C:\src\test\a.cpp:1003
531 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_3", type = "S1", valid ranges = <block>, location = [0x000000014000104b, 0x000000014000104e) -> DW_OP_reg2 RCX
533 # CHECK: (lldb) image lookup -a 0x14000104c -v
534 # CHECK: LineEntry: [0x0000000140001045-0x000000014000104e): C:\src\test\a.cpp:1003
535 # CHECK-NEXT: Variable: id = {{.*}}, name = "overlapped_ranges_3", type = "S1", valid ranges = <block>, location = [0x000000014000104b, 0x000000014000104e) -> DW_OP_reg2 RCX
538 # 5. Simple type with subfield.
540 .short 4414 # Record kind: S_LOCAL
543 .asciz "simple_type1"
546 .cv_def_range .L4e .L4f, subfield_reg, 17, 4
547 .cv_def_range .L4e .L50, subfield_reg, 18, 0
549 .short 4431 # Record kind: S_PROC_ID_END
550 # CHECK: (lldb) image lookup -a 0x14000104e -v
551 # CHECK: LineEntry: [0x000000014000104e-0x0000000140001050): C:\src\test\a.cpp:1004
552 # CHECK-NEXT: Variable: id = {{.*}}, name = "simple_type1", type = "int64_t", valid ranges = <block>, location = [0x000000014000104e, 0x000000014000104f) -> DW_OP_reg26 XMM9, DW_OP_piece 0x4, DW_OP_reg24 XMM7, DW_OP_piece 0x4
554 # CHECK: (lldb) image lookup -a 0x14000104f -v
555 # CHECK: LineEntry: [0x000000014000104e-0x0000000140001050): C:\src\test\a.cpp:1004
556 # CHECK-NEXT: Variable: id = {{.*}}, name = "simple_type1", type = "int64_t", valid ranges = <block>, location = [0x000000014000104f, 0x0000000140001050) -> DW_OP_reg26 XMM9, DW_OP_piece 0x4, DW_OP_piece 0x4
561 .cv_linetable 1, main, .Lfunc_end1
562 .section .debug$S,"dr"
564 .long .Ltmp40-.Ltmp39 # Subsection size
566 .short .Ltmp42-.Ltmp41 # Record length
568 .short 4360 # Record kind: S_UDT
575 .cv_filechecksums # File index to string table offset subsection
576 .cv_stringtable # String table
578 .long .Ltmp44-.Ltmp43 # Subsection size
580 .short .Ltmp46-.Ltmp45 # Record length
582 .short 4428 # Record kind: S_BUILDINFO
583 .long 4110 # LF_BUILDINFO index
588 .section .debug$T,"dr"
590 .long 4 # Debug section magic
592 .short 0x1e # Record length
593 .short 0x1505 # Record kind: LF_STRUCTURE
594 .short 0x0 # MemberCount
595 .short 0x280 # Properties ( ForwardReference (0x80) | HasUniqueName (0x200) )
596 .long 0x0 # FieldList
597 .long 0x0 # DerivedFrom
601 .asciz ".?AUS@@" # LinkageName
603 .short 0xe # Record length
604 .short 0x1201 # Record kind: LF_ARGLIST
606 .long 0x74 # Argument: int
607 .long 0x70 # Argument: char
609 .short 0xe # Record length
610 .short 0x1008 # Record kind: LF_PROCEDURE
611 .long 0x1000 # ReturnType: S
612 .byte 0x0 # CallingConvention: NearC
613 .byte 0x0 # FunctionOptions
614 .short 0x2 # NumParameters
615 .long 0x1001 # ArgListType: (int, char)
617 .short 0x1a # Record length
618 .short 0x1203 # Record kind: LF_FIELDLIST
619 .short 0x150d # Member kind: DataMember ( LF_MEMBER )
620 .short 0x3 # Attrs: Public
621 .long 0x74 # Type: int
622 .short 0x0 # FieldOffset
624 .short 0x150d # Member kind: DataMember ( LF_MEMBER )
625 .short 0x3 # Attrs: Public
626 .long 0x70 # Type: char
627 .short 0x4 # FieldOffset
630 .short 0x1e # Record length
631 .short 0x1505 # Record kind: LF_STRUCTURE
632 .short 0x2 # MemberCount
633 .short 0x200 # Properties ( HasUniqueName (0x200) )
634 .long 0x1003 # FieldList: <field list>
635 .long 0x0 # DerivedFrom
639 .asciz ".?AUS@@" # LinkageName
641 .short 0x1a # Record length
642 .short 0x1605 # Record kind: LF_STRING_ID
644 .asciz "C:\\src\\test\\a.cpp" # StringData
647 # UdtSourceLine (0x1006)
648 .short 0xe # Record length
649 .short 0x1606 # Record kind: LF_UDT_SRC_LINE
650 .long 0x1004 # UDT: S
651 .long 0x1005 # SourceFile: C:\src\test\a.cpp
652 .long 0x1 # LineNumber
654 .short 0x12 # Record length
655 .short 0x1601 # Record kind: LF_FUNC_ID
656 .long 0x0 # ParentScope
657 .long 0x1002 # FunctionType: S (int, char)
658 .asciz "CreateS" # Name
660 .short 0xa # Record length
661 .short 0x1002 # Record kind: LF_POINTER
662 .long 0x670 # PointeeType: char*
663 .long 0x1000c # Attrs: [ Type: Near64, Mode: Pointer, SizeOf: 8 ]
665 .short 0xe # Record length
666 .short 0x1201 # Record kind: LF_ARGLIST
668 .long 0x74 # Argument: int
669 .long 0x1008 # Argument: char**
671 .short 0xe # Record length
672 .short 0x1008 # Record kind: LF_PROCEDURE
673 .long 0x74 # ReturnType: int
674 .byte 0x0 # CallingConvention: NearC
675 .byte 0x0 # FunctionOptions
676 .short 0x2 # NumParameters
677 .long 0x1009 # ArgListType: (int, char**)
679 .short 0x12 # Record length
680 .short 0x1601 # Record kind: LF_FUNC_ID
681 .long 0x0 # ParentScope
682 .long 0x100a # FunctionType: int (int, char**)
687 # Manually created debug info for testing purpose, FieldList (0x100C) and Struct (0x100D)
689 .short 0x1a # Record length
690 .short 0x1203 # Record kind: LF_FIELDLIST
691 .short 0x150d # Member kind: DataMember ( LF_MEMBER )
692 .short 0x3 # Attrs: Public
693 .long 0x70 # Type: char
694 .short 0x0 # FieldOffset
696 .short 0x150d # Member kind: DataMember ( LF_MEMBER )
697 .short 0x3 # Attrs: Public
698 .long 0x74 # Type: int
699 .short 0x4 # FieldOffset
702 .short 0x20 # Record length
703 .short 0x1505 # Record kind: LF_STRUCTURE
704 .short 0x2 # MemberCount
705 .short 0x200 # Properties ( HasUniqueName (0x200) )
706 .long 0x100c # FieldList: <field list>
707 .long 0x0 # DerivedFrom
711 .asciz ".?AUS1@@" # LinkageName
713 .short 0x1a # Record length
714 .short 0x1603 # Record kind: LF_BUILDINFO