1.ifdef GEN 2#--- b.cc 3struct t1 { }; 4namespace ns { 5struct t2 {}; 6} 7int main() { t1 v1; ns::t2 v2; } 8#--- gen 9clang --target=x86_64-linux -S -g -gpubnames b.cc -o - 10.endif 11 .text 12 .file "b.cc" 13 .globl main # -- Begin function main 14 .p2align 4, 0x90 15 .type main,@function 16main: # @main 17.Lfunc_begin0: 18 .file 0 "/proc/self/cwd" "b.cc" md5 0xcb70125759dcd65dfed077164397a2f4 19 .loc 0 5 0 # b.cc:5:0 20 .cfi_startproc 21# %bb.0: # %entry 22 pushq %rbp 23 .cfi_def_cfa_offset 16 24 .cfi_offset %rbp, -16 25 movq %rsp, %rbp 26 .cfi_def_cfa_register %rbp 27.Ltmp0: 28 .loc 0 5 32 prologue_end # b.cc:5:32 29 xorl %eax, %eax 30 .loc 0 5 32 epilogue_begin is_stmt 0 # b.cc:5:32 31 popq %rbp 32 .cfi_def_cfa %rsp, 8 33 retq 34.Ltmp1: 35.Lfunc_end0: 36 .size main, .Lfunc_end0-main 37 .cfi_endproc 38 # -- End function 39 .section .debug_abbrev,"",@progbits 40 .byte 1 # Abbreviation Code 41 .byte 17 # DW_TAG_compile_unit 42 .byte 1 # DW_CHILDREN_yes 43 .byte 37 # DW_AT_producer 44 .byte 37 # DW_FORM_strx1 45 .byte 19 # DW_AT_language 46 .byte 5 # DW_FORM_data2 47 .byte 3 # DW_AT_name 48 .byte 37 # DW_FORM_strx1 49 .byte 114 # DW_AT_str_offsets_base 50 .byte 23 # DW_FORM_sec_offset 51 .byte 16 # DW_AT_stmt_list 52 .byte 23 # DW_FORM_sec_offset 53 .byte 27 # DW_AT_comp_dir 54 .byte 37 # DW_FORM_strx1 55 .byte 17 # DW_AT_low_pc 56 .byte 27 # DW_FORM_addrx 57 .byte 18 # DW_AT_high_pc 58 .byte 6 # DW_FORM_data4 59 .byte 115 # DW_AT_addr_base 60 .byte 23 # DW_FORM_sec_offset 61 .byte 0 # EOM(1) 62 .byte 0 # EOM(2) 63 .byte 2 # Abbreviation Code 64 .byte 46 # DW_TAG_subprogram 65 .byte 1 # DW_CHILDREN_yes 66 .byte 17 # DW_AT_low_pc 67 .byte 27 # DW_FORM_addrx 68 .byte 18 # DW_AT_high_pc 69 .byte 6 # DW_FORM_data4 70 .byte 64 # DW_AT_frame_base 71 .byte 24 # DW_FORM_exprloc 72 .byte 3 # DW_AT_name 73 .byte 37 # DW_FORM_strx1 74 .byte 58 # DW_AT_decl_file 75 .byte 11 # DW_FORM_data1 76 .byte 59 # DW_AT_decl_line 77 .byte 11 # DW_FORM_data1 78 .byte 73 # DW_AT_type 79 .byte 19 # DW_FORM_ref4 80 .byte 63 # DW_AT_external 81 .byte 25 # DW_FORM_flag_present 82 .byte 0 # EOM(1) 83 .byte 0 # EOM(2) 84 .byte 3 # Abbreviation Code 85 .byte 52 # DW_TAG_variable 86 .byte 0 # DW_CHILDREN_no 87 .byte 2 # DW_AT_location 88 .byte 24 # DW_FORM_exprloc 89 .byte 3 # DW_AT_name 90 .byte 37 # DW_FORM_strx1 91 .byte 58 # DW_AT_decl_file 92 .byte 11 # DW_FORM_data1 93 .byte 59 # DW_AT_decl_line 94 .byte 11 # DW_FORM_data1 95 .byte 73 # DW_AT_type 96 .byte 19 # DW_FORM_ref4 97 .byte 0 # EOM(1) 98 .byte 0 # EOM(2) 99 .byte 4 # Abbreviation Code 100 .byte 36 # DW_TAG_base_type 101 .byte 0 # DW_CHILDREN_no 102 .byte 3 # DW_AT_name 103 .byte 37 # DW_FORM_strx1 104 .byte 62 # DW_AT_encoding 105 .byte 11 # DW_FORM_data1 106 .byte 11 # DW_AT_byte_size 107 .byte 11 # DW_FORM_data1 108 .byte 0 # EOM(1) 109 .byte 0 # EOM(2) 110 .byte 5 # Abbreviation Code 111 .byte 19 # DW_TAG_structure_type 112 .byte 0 # DW_CHILDREN_no 113 .byte 54 # DW_AT_calling_convention 114 .byte 11 # DW_FORM_data1 115 .byte 3 # DW_AT_name 116 .byte 37 # DW_FORM_strx1 117 .byte 11 # DW_AT_byte_size 118 .byte 11 # DW_FORM_data1 119 .byte 58 # DW_AT_decl_file 120 .byte 11 # DW_FORM_data1 121 .byte 59 # DW_AT_decl_line 122 .byte 11 # DW_FORM_data1 123 .byte 0 # EOM(1) 124 .byte 0 # EOM(2) 125 .byte 6 # Abbreviation Code 126 .byte 57 # DW_TAG_namespace 127 .byte 1 # DW_CHILDREN_yes 128 .byte 3 # DW_AT_name 129 .byte 37 # DW_FORM_strx1 130 .byte 0 # EOM(1) 131 .byte 0 # EOM(2) 132 .byte 0 # EOM(3) 133 .section .debug_info,"",@progbits 134.Lcu_begin0: 135 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 136.Ldebug_info_start0: 137 .short 5 # DWARF version number 138 .byte 1 # DWARF Unit Type 139 .byte 8 # Address Size (in bytes) 140 .long .debug_abbrev # Offset Into Abbrev. Section 141 .byte 1 # Abbrev [1] 0xc:0x51 DW_TAG_compile_unit 142 .byte 0 # DW_AT_producer 143 .short 33 # DW_AT_language 144 .byte 1 # DW_AT_name 145 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base 146 .long .Lline_table_start0 # DW_AT_stmt_list 147 .byte 2 # DW_AT_comp_dir 148 .byte 0 # DW_AT_low_pc 149 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 150 .long .Laddr_table_base0 # DW_AT_addr_base 151 .byte 2 # Abbrev [2] 0x23:0x26 DW_TAG_subprogram 152 .byte 0 # DW_AT_low_pc 153 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 154 .byte 1 # DW_AT_frame_base 155 .byte 86 156 .byte 3 # DW_AT_name 157 .byte 0 # DW_AT_decl_file 158 .byte 5 # DW_AT_decl_line 159 .long 73 # DW_AT_type 160 # DW_AT_external 161 .byte 3 # Abbrev [3] 0x32:0xb DW_TAG_variable 162 .byte 2 # DW_AT_location 163 .byte 145 164 .byte 127 165 .byte 5 # DW_AT_name 166 .byte 0 # DW_AT_decl_file 167 .byte 5 # DW_AT_decl_line 168 .long 77 # DW_AT_type 169 .byte 3 # Abbrev [3] 0x3d:0xb DW_TAG_variable 170 .byte 2 # DW_AT_location 171 .byte 145 172 .byte 126 173 .byte 7 # DW_AT_name 174 .byte 0 # DW_AT_decl_file 175 .byte 5 # DW_AT_decl_line 176 .long 85 # DW_AT_type 177 .byte 0 # End Of Children Mark 178 .byte 4 # Abbrev [4] 0x49:0x4 DW_TAG_base_type 179 .byte 4 # DW_AT_name 180 .byte 5 # DW_AT_encoding 181 .byte 4 # DW_AT_byte_size 182 .byte 5 # Abbrev [5] 0x4d:0x6 DW_TAG_structure_type 183 .byte 5 # DW_AT_calling_convention 184 .byte 6 # DW_AT_name 185 .byte 1 # DW_AT_byte_size 186 .byte 0 # DW_AT_decl_file 187 .byte 1 # DW_AT_decl_line 188 .byte 6 # Abbrev [6] 0x53:0x9 DW_TAG_namespace 189 .byte 8 # DW_AT_name 190 .byte 5 # Abbrev [5] 0x55:0x6 DW_TAG_structure_type 191 .byte 5 # DW_AT_calling_convention 192 .byte 9 # DW_AT_name 193 .byte 1 # DW_AT_byte_size 194 .byte 0 # DW_AT_decl_file 195 .byte 3 # DW_AT_decl_line 196 .byte 0 # End Of Children Mark 197 .byte 0 # End Of Children Mark 198.Ldebug_info_end0: 199 .section .debug_str_offsets,"",@progbits 200 .long 44 # Length of String Offsets Set 201 .short 5 202 .short 0 203.Lstr_offsets_base0: 204 .section .debug_str,"MS",@progbits,1 205.Linfo_string0: 206 .byte 0 # string offset=0 207.Linfo_string1: 208 .asciz "b.cc" # string offset=1 209.Linfo_string2: 210 .asciz "/proc/self/cwd" # string offset=6 211.Linfo_string3: 212 .asciz "main" # string offset=21 213.Linfo_string4: 214 .asciz "int" # string offset=26 215.Linfo_string5: 216 .asciz "v1" # string offset=30 217.Linfo_string6: 218 .asciz "t1" # string offset=33 219.Linfo_string7: 220 .asciz "v2" # string offset=36 221.Linfo_string8: 222 .asciz "ns" # string offset=39 223.Linfo_string9: 224 .asciz "t2" # string offset=42 225 .section .debug_str_offsets,"",@progbits 226 .long .Linfo_string0 227 .long .Linfo_string1 228 .long .Linfo_string2 229 .long .Linfo_string3 230 .long .Linfo_string4 231 .long .Linfo_string5 232 .long .Linfo_string6 233 .long .Linfo_string7 234 .long .Linfo_string8 235 .long .Linfo_string9 236 .section .debug_addr,"",@progbits 237 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution 238.Ldebug_addr_start0: 239 .short 5 # DWARF version number 240 .byte 8 # Address size 241 .byte 0 # Segment selector size 242.Laddr_table_base0: 243 .quad .Lfunc_begin0 244.Ldebug_addr_end0: 245 .section .debug_names,"",@progbits 246 .long .Lnames_end0-.Lnames_start0 # Header: unit length 247.Lnames_start0: 248 .short 5 # Header: version 249 .short 0 # Header: padding 250 .long 1 # Header: compilation unit count 251 .long 0 # Header: local type unit count 252 .long 0 # Header: foreign type unit count 253 .long 5 # Header: bucket count 254 .long 5 # Header: name count 255 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size 256 .long 8 # Header: augmentation string size 257 .ascii "LLVM0700" # Header: augmentation string 258 .long .Lcu_begin0 # Compilation unit 0 259 .long 0 # Bucket 0 260 .long 1 # Bucket 1 261 .long 3 # Bucket 2 262 .long 4 # Bucket 3 263 .long 5 # Bucket 4 264 .long 5863786 # Hash in Bucket 1 265 .long 2090499946 # Hash in Bucket 1 266 .long 5863787 # Hash in Bucket 2 267 .long 193495088 # Hash in Bucket 3 268 .long 5863654 # Hash in Bucket 4 269 .long .Linfo_string6 # String in Bucket 1: t1 270 .long .Linfo_string3 # String in Bucket 1: main 271 .long .Linfo_string9 # String in Bucket 2: t2 272 .long .Linfo_string4 # String in Bucket 3: int 273 .long .Linfo_string8 # String in Bucket 4: ns 274 .long .Lnames2-.Lnames_entries0 # Offset in Bucket 1 275 .long .Lnames0-.Lnames_entries0 # Offset in Bucket 1 276 .long .Lnames4-.Lnames_entries0 # Offset in Bucket 2 277 .long .Lnames1-.Lnames_entries0 # Offset in Bucket 3 278 .long .Lnames3-.Lnames_entries0 # Offset in Bucket 4 279.Lnames_abbrev_start0: 280 .byte 1 # Abbrev code 281 .byte 19 # DW_TAG_structure_type 282 .byte 3 # DW_IDX_die_offset 283 .byte 19 # DW_FORM_ref4 284 .byte 4 # DW_IDX_parent 285 .byte 25 # DW_FORM_flag_present 286 .byte 0 # End of abbrev 287 .byte 0 # End of abbrev 288 .byte 2 # Abbrev code 289 .byte 46 # DW_TAG_subprogram 290 .byte 3 # DW_IDX_die_offset 291 .byte 19 # DW_FORM_ref4 292 .byte 4 # DW_IDX_parent 293 .byte 25 # DW_FORM_flag_present 294 .byte 0 # End of abbrev 295 .byte 0 # End of abbrev 296 .byte 3 # Abbrev code 297 .byte 19 # DW_TAG_structure_type 298 .byte 3 # DW_IDX_die_offset 299 .byte 19 # DW_FORM_ref4 300 .byte 4 # DW_IDX_parent 301 .byte 19 # DW_FORM_ref4 302 .byte 0 # End of abbrev 303 .byte 0 # End of abbrev 304 .byte 4 # Abbrev code 305 .byte 36 # DW_TAG_base_type 306 .byte 3 # DW_IDX_die_offset 307 .byte 19 # DW_FORM_ref4 308 .byte 4 # DW_IDX_parent 309 .byte 25 # DW_FORM_flag_present 310 .byte 0 # End of abbrev 311 .byte 0 # End of abbrev 312 .byte 5 # Abbrev code 313 .byte 57 # DW_TAG_namespace 314 .byte 3 # DW_IDX_die_offset 315 .byte 19 # DW_FORM_ref4 316 .byte 4 # DW_IDX_parent 317 .byte 25 # DW_FORM_flag_present 318 .byte 0 # End of abbrev 319 .byte 0 # End of abbrev 320 .byte 0 # End of abbrev list 321.Lnames_abbrev_end0: 322.Lnames_entries0: 323.Lnames2: 324.L4: 325 .byte 1 # Abbreviation code 326 .long 77 # DW_IDX_die_offset 327 .byte 0 # DW_IDX_parent 328 # End of list: t1 329.Lnames0: 330.L2: 331 .byte 2 # Abbreviation code 332 .long 35 # DW_IDX_die_offset 333 .byte 0 # DW_IDX_parent 334 # End of list: main 335.Lnames4: 336.L3: 337 .byte 3 # Abbreviation code 338 .long 85 # DW_IDX_die_offset 339 .long .L1-.Lnames_entries0 # DW_IDX_parent 340 .byte 0 # End of list: t2 341.Lnames1: 342.L0: 343 .byte 4 # Abbreviation code 344 .long 73 # DW_IDX_die_offset 345 .byte 0 # DW_IDX_parent 346 # End of list: int 347.Lnames3: 348.L1: 349 .byte 5 # Abbreviation code 350 .long 83 # DW_IDX_die_offset 351 .byte 0 # DW_IDX_parent 352 # End of list: ns 353 .p2align 2, 0x0 354.Lnames_end0: 355 .section ".note.GNU-stack","",@progbits 356 .addrsig 357 .section .debug_line,"",@progbits 358.Lline_table_start0: 359