2 # RUN: llvm-mc --triple=x86_64-pc-windows --filetype=obj --defsym DLL=0 %s >%t.dll.o
3 # RUN: llvm-mc --triple=x86_64-pc-windows --filetype=obj --defsym EXE=0 %s >%t.exe.o
4 # RUN: lld-link /OUT:%t.dll %t.dll.o /SUBSYSTEM:console /dll /noentry /debug
5 # RUN: lld-link /OUT:%t.exe %t.exe.o /SUBSYSTEM:console /debug /force
6 # RUN: %lldb %t.exe -o "target modules add %t.dll" -o "expression var" \
7 # RUN: -o exit 2>&1 | FileCheck %s
9 # CHECK: (lldb) expression var
10 # CHECK: (A) $0 = (member = 47)
12 .section .debug_abbrev,"dr"
14 .byte 1 # Abbreviation Code
15 .byte 17 # DW_TAG_compile_unit
16 .byte 1 # DW_CHILDREN_yes
17 .byte 37 # DW_AT_producer
18 .byte 8 # DW_FORM_string
21 .byte 2 # Abbreviation Code
22 .byte 52 # DW_TAG_variable
23 .byte 0 # DW_CHILDREN_no
25 .byte 8 # DW_FORM_string
27 .byte 19 # DW_FORM_ref4
28 .byte 2 # DW_AT_location
29 .byte 24 # DW_FORM_exprloc
32 .byte 3 # Abbreviation Code
33 .byte 19 # DW_TAG_structure_type
34 .byte 1 # DW_CHILDREN_yes
36 .byte 8 # DW_FORM_string
37 .byte 11 # DW_AT_byte_size
38 .byte 11 # DW_FORM_data1
41 .byte 4 # Abbreviation Code
42 .byte 13 # DW_TAG_member
43 .byte 0 # DW_CHILDREN_no
45 .byte 8 # DW_FORM_string
47 .byte 19 # DW_FORM_ref4
48 .byte 56 # DW_AT_data_member_location
49 .byte 11 # DW_FORM_data1
52 .byte 5 # Abbreviation Code
53 .byte 36 # DW_TAG_base_type
54 .byte 0 # DW_CHILDREN_no
56 .byte 8 # DW_FORM_string
57 .byte 62 # DW_AT_encoding
58 .byte 11 # DW_FORM_data1
59 .byte 11 # DW_AT_byte_size
60 .byte 11 # DW_FORM_data1
63 .byte 6 # Abbreviation Code
64 .byte 19 # DW_TAG_structure_type
65 .byte 0 # DW_CHILDREN_no
67 .byte 8 # DW_FORM_string
68 .byte 60 # DW_AT_declaration
69 .byte 25 # DW_FORM_flag_present
75 .section .debug_info,"dr"
78 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
80 .short 4 # DWARF version number
81 .secrel32 .Lsection_abbrev # Offset Into Abbrev. Section
82 .byte 8 # Address Size (in bytes)
83 .byte 1 # Abbrev [1] 0xb:0x4a DW_TAG_compile_unit
84 .asciz "Hand-written DWARF" # DW_AT_producer
85 .byte 3 # Abbrev [3] 0x37:0x16 DW_TAG_structure_type
86 .asciz "A" # DW_AT_name
87 .byte 4 # DW_AT_byte_size
88 .byte 4 # Abbrev [4] 0x40:0xc DW_TAG_member
89 .asciz "member" # DW_AT_name
90 .long .Lint-.Lsection_info # DW_AT_type
91 .byte 0 # DW_AT_data_member_location
92 .byte 0 # End Of Children Mark
94 .byte 5 # Abbrev [5] 0x4d:0x7 DW_TAG_base_type
95 .asciz "int" # DW_AT_name
96 .byte 5 # DW_AT_encoding
97 .byte 4 # DW_AT_byte_size
98 .byte 0 # End Of Children Mark
109 .section .debug_info,"dr"
112 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
114 .short 4 # DWARF version number
115 .secrel32 .Lsection_abbrev # Offset Into Abbrev. Section
116 .byte 8 # Address Size (in bytes)
117 .byte 1 # Abbrev [1] 0xb:0x4a DW_TAG_compile_unit
118 .asciz "Hand-written DWARF" # DW_AT_producer
119 .byte 2 # Abbrev [2] 0x1e:0x19 DW_TAG_variable
120 .asciz "var" # DW_AT_name
121 .long .LA-.Lsection_info # DW_AT_type
122 .byte 9 # DW_AT_location
126 .byte 6 # Abbrev [6] 0x37:0x16 DW_TAG_structure_type
127 .asciz "A" # DW_AT_name
129 .byte 0 # End Of Children Mark