1# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux %s -o %t 2# RUN: lldb-test symbols %t | FileCheck %s 3 4 .file 1 "/tmp" "b.cc" 5 6 .section .debug_types,"",@progbits 7 8# CHECK: Types: 9# Type unit one: "struct A" defined at b.cc:1 10# CHECK-DAG: name = "A", size = 4, decl = b.cc:1 111: 12 .long 4f-2f # Length of Unit 132: 14 .short 4 # DWARF version number 15 .long .debug_abbrev # Offset Into Abbrev. Section 16 .byte 8 # Address Size (in bytes) 17 .quad 5390450678491038984 # Type Signature 18 .long 3f-1b # Type DIE Offset 19 .byte 1 # Abbrev [1] 0x17:0x1b DW_TAG_type_unit 20 .short 4 # DW_AT_language 21 .long .Lline_table_start0 # DW_AT_stmt_list 223: 23 .byte 2 # Abbrev [2] 0x1e:0xc DW_TAG_structure_type 24 .long .LA # DW_AT_name 25 .byte 4 # DW_AT_byte_size 26 .byte 1 # DW_AT_decl_file 27 .byte 1 # DW_AT_decl_line 28 .byte 0 # End Of Children Mark 294: 30 31# Type unit two: "struct B" defined at b.cc:2 32# It shares the same line table as unit one. 33# CHECK-DAG: name = "B", size = 4, decl = b.cc:2 341: 35 .long 4f-2f # Length of Unit 362: 37 .short 4 # DWARF version number 38 .long .debug_abbrev # Offset Into Abbrev. Section 39 .byte 8 # Address Size (in bytes) 40 .quad 5390450678491038985 # Type Signature 41 .long 3f-1b # Type DIE Offset 42 .byte 1 # Abbrev [1] 0x17:0x1b DW_TAG_type_unit 43 .short 4 # DW_AT_language 44 .long .Lline_table_start0 # DW_AT_stmt_list 453: 46 .byte 2 # Abbrev [2] 0x1e:0xc DW_TAG_structure_type 47 .long .LB # DW_AT_name 48 .byte 4 # DW_AT_byte_size 49 .byte 1 # DW_AT_decl_file 50 .byte 2 # DW_AT_decl_line 51 .byte 0 # End Of Children Mark 524: 53 54# Type unit three: "struct C". 55# DW_AT_stmt_list missing 56# CHECK-DAG: name = "C", size = 4, line = 3 571: 58 .long 4f-2f # Length of Unit 592: 60 .short 4 # DWARF version number 61 .long .debug_abbrev # Offset Into Abbrev. Section 62 .byte 8 # Address Size (in bytes) 63 .quad 5390450678491038986 # Type Signature 64 .long 3f-1b # Type DIE Offset 65 .byte 4 # Abbrev [4] 0x17:0x1b DW_TAG_type_unit 66 .short 4 # DW_AT_language 673: 68 .byte 2 # Abbrev [2] 0x1e:0xc DW_TAG_structure_type 69 .long .LC # DW_AT_name 70 .byte 4 # DW_AT_byte_size 71 .byte 1 # DW_AT_decl_file 72 .byte 3 # DW_AT_decl_line 73 .byte 0 # End Of Children Mark 744: 75 76# Type unit four: "struct D". 77# DW_AT_stmt_list invalid 78# CHECK-DAG: name = "D", size = 4, line = 4 791: 80 .long 4f-2f # Length of Unit 812: 82 .short 4 # DWARF version number 83 .long .debug_abbrev # Offset Into Abbrev. Section 84 .byte 8 # Address Size (in bytes) 85 .quad 5390450678491038987 # Type Signature 86 .long 3f-1b # Type DIE Offset 87 .byte 1 # Abbrev [1] 0x17:0x1b DW_TAG_type_unit 88 .short 4 # DW_AT_language 89 .long .Lline_table_start0+47 # DW_AT_stmt_list 903: 91 .byte 2 # Abbrev [2] 0x1e:0xc DW_TAG_structure_type 92 .long .LD # DW_AT_name 93 .byte 4 # DW_AT_byte_size 94 .byte 1 # DW_AT_decl_file 95 .byte 4 # DW_AT_decl_line 96 .byte 0 # End Of Children Mark 974: 98 99# Type unit five: "struct E". 100# DW_AT_decl_file invalid 101# CHECK-DAG: name = "E", size = 4, line = 5 1021: 103 .long 4f-2f # Length of Unit 1042: 105 .short 4 # DWARF version number 106 .long .debug_abbrev # Offset Into Abbrev. Section 107 .byte 8 # Address Size (in bytes) 108 .quad 5390450678491038988 # Type Signature 109 .long 3f-1b # Type DIE Offset 110 .byte 1 # Abbrev [1] 0x17:0x1b DW_TAG_type_unit 111 .short 4 # DW_AT_language 112 .long .Lline_table_start0 # DW_AT_stmt_list 1133: 114 .byte 2 # Abbrev [2] 0x1e:0xc DW_TAG_structure_type 115 .long .LE # DW_AT_name 116 .byte 4 # DW_AT_byte_size 117 .byte 47 # DW_AT_decl_file 118 .byte 5 # DW_AT_decl_line 119 .byte 0 # End Of Children Mark 1204: 121 122 123 .section .debug_str,"MS",@progbits,1 124.LA: 125 .asciz "A" 126.LB: 127 .asciz "B" 128.LC: 129 .asciz "C" 130.LD: 131 .asciz "D" 132.LE: 133 .asciz "E" 134 135 .section .debug_abbrev,"",@progbits 136 .byte 1 # Abbreviation Code 137 .byte 65 # DW_TAG_type_unit 138 .byte 1 # DW_CHILDREN_yes 139 .byte 19 # DW_AT_language 140 .byte 5 # DW_FORM_data2 141 .byte 16 # DW_AT_stmt_list 142 .byte 23 # DW_FORM_sec_offset 143 .byte 0 # EOM(1) 144 .byte 0 # EOM(2) 145 .byte 2 # Abbreviation Code 146 .byte 19 # DW_TAG_structure_type 147 .byte 0 # DW_CHILDREN_no 148 .byte 3 # DW_AT_name 149 .byte 14 # DW_FORM_strp 150 .byte 11 # DW_AT_byte_size 151 .byte 11 # DW_FORM_data1 152 .byte 58 # DW_AT_decl_file 153 .byte 11 # DW_FORM_data1 154 .byte 59 # DW_AT_decl_line 155 .byte 11 # DW_FORM_data1 156 .byte 0 # EOM(1) 157 .byte 0 # EOM(2) 158 .byte 3 # Abbreviation Code 159 .byte 65 # DW_TAG_type_unit 160 .byte 1 # DW_CHILDREN_yes 161 .byte 19 # DW_AT_language 162 .byte 5 # DW_FORM_data2 163 .byte 0 # EOM(1) 164 .byte 0 # EOM(2) 165 .byte 4 # Abbreviation Code 166 .byte 17 # DW_TAG_compile_unit 167 .byte 1 # DW_CHILDREN_yes 168 .byte 0 # EOM(1) 169 .byte 0 # EOM(2) 170 .byte 5 # Abbreviation Code 171 .byte 19 # DW_TAG_structure_type 172 .byte 0 # DW_CHILDREN_no 173 .byte 105 # DW_AT_signature 174 .byte 32 # DW_FORM_ref_sig8 175 .byte 0 # EOM(1) 176 .byte 0 # EOM(2) 177 .byte 0 # EOM(3) 178 .section .debug_info,"",@progbits 179.Lcu_begin0: 180 .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit 181.Ldebug_info_start1: 182 .short 4 # DWARF version number 183 .long .debug_abbrev # Offset Into Abbrev. Section 184 .byte 8 # Address Size (in bytes) 185 .byte 4 # Abbrev [4] 0xb:0x32 DW_TAG_compile_unit 186 .byte 5 # Abbrev [5] DW_TAG_structure_type 187 .quad 5390450678491038984 # DW_AT_signature 188 .byte 5 # Abbrev [5] DW_TAG_structure_type 189 .quad 5390450678491038985 # DW_AT_signature 190 .byte 5 # Abbrev [5] DW_TAG_structure_type 191 .quad 5390450678491038986 # DW_AT_signature 192 .byte 5 # Abbrev [5] DW_TAG_structure_type 193 .quad 5390450678491038987 # DW_AT_signature 194 .byte 5 # Abbrev [5] DW_TAG_structure_type 195 .quad 5390450678491038988 # DW_AT_signature 196 .byte 0 # End Of Children Mark 197.Ldebug_info_end1: 198 199 .section .debug_line,"",@progbits 200.Lline_table_start0: 201