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