1# clang++ helper.cpp -ggnu-pubnames -g2 -gdwarf-5 -fdebug-types-section 2# typedef struct 3# { 4# unsigned a; 5# unsigned b; 6# } S2; 7# 8# int foo() { 9# S2 s; 10# s.a = 0x64A40101; 11# } 12 13 .text 14 .file "helper.cpp" 15 .globl _Z3foov # -- Begin function _Z3foov 16 .p2align 4, 0x90 17 .type _Z3foov,@function 18_Z3foov: # @_Z3foov 19.Lfunc_begin0: 20 .file 0 "/dwarf5-gdb-index-test" "helper.cpp" md5 0x63be655bdfe24168950731bad45bb40b 21 .loc 0 7 0 # helper.cpp:7:0 22 .cfi_startproc 23# %bb.0: 24 pushq %rbp 25 .cfi_def_cfa_offset 16 26 .cfi_offset %rbp, -16 27 movq %rsp, %rbp 28 .cfi_def_cfa_register %rbp 29.Ltmp0: 30 .loc 0 9 7 prologue_end # helper.cpp:9:7 31 movl $1688469761, -8(%rbp) # imm = 0x64A40101 32 .loc 0 9 3 is_stmt 0 # helper.cpp:9:3 33 ud2 34.Ltmp1: 35.Lfunc_end0: 36 .size _Z3foov, .Lfunc_end0-_Z3foov 37 .cfi_endproc 38 # -- End function 39 .section .debug_info,"G",@progbits,69467852836524312,comdat 40 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 41.Ldebug_info_start0: 42 .short 5 # DWARF version number 43 .byte 2 # DWARF Unit Type 44 .byte 8 # Address Size (in bytes) 45 .long .debug_abbrev # Offset Into Abbrev. Section 46 .quad 69467852836524312 # Type Signature 47 .long 35 # Type DIE Offset 48 .byte 1 # Abbrev [1] 0x18:0x28 DW_TAG_type_unit 49 .short 33 # DW_AT_language 50 .long .Lline_table_start0 # DW_AT_stmt_list 51 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base 52 .byte 2 # Abbrev [2] 0x23:0x18 DW_TAG_structure_type 53 .byte 5 # DW_AT_calling_convention 54 .byte 8 # DW_AT_byte_size 55 .byte 0 # DW_AT_decl_file 56 .byte 1 # DW_AT_decl_line 57 .byte 3 # Abbrev [3] 0x28:0x9 DW_TAG_member 58 .byte 7 # DW_AT_name 59 .long 59 # DW_AT_type 60 .byte 0 # DW_AT_decl_file 61 .byte 3 # DW_AT_decl_line 62 .byte 0 # DW_AT_data_member_location 63 .byte 3 # Abbrev [3] 0x31:0x9 DW_TAG_member 64 .byte 9 # DW_AT_name 65 .long 59 # DW_AT_type 66 .byte 0 # DW_AT_decl_file 67 .byte 4 # DW_AT_decl_line 68 .byte 4 # DW_AT_data_member_location 69 .byte 0 # End Of Children Mark 70 .byte 4 # Abbrev [4] 0x3b:0x4 DW_TAG_base_type 71 .byte 8 # DW_AT_name 72 .byte 7 # DW_AT_encoding 73 .byte 4 # DW_AT_byte_size 74 .byte 0 # End Of Children Mark 75.Ldebug_info_end0: 76 .section .debug_abbrev,"",@progbits 77 .byte 1 # Abbreviation Code 78 .byte 65 # DW_TAG_type_unit 79 .byte 1 # DW_CHILDREN_yes 80 .byte 19 # DW_AT_language 81 .byte 5 # DW_FORM_data2 82 .byte 16 # DW_AT_stmt_list 83 .byte 23 # DW_FORM_sec_offset 84 .byte 114 # DW_AT_str_offsets_base 85 .byte 23 # DW_FORM_sec_offset 86 .byte 0 # EOM(1) 87 .byte 0 # EOM(2) 88 .byte 2 # Abbreviation Code 89 .byte 19 # DW_TAG_structure_type 90 .byte 1 # DW_CHILDREN_yes 91 .byte 54 # DW_AT_calling_convention 92 .byte 11 # DW_FORM_data1 93 .byte 11 # DW_AT_byte_size 94 .byte 11 # DW_FORM_data1 95 .byte 58 # DW_AT_decl_file 96 .byte 11 # DW_FORM_data1 97 .byte 59 # DW_AT_decl_line 98 .byte 11 # DW_FORM_data1 99 .byte 0 # EOM(1) 100 .byte 0 # EOM(2) 101 .byte 3 # Abbreviation Code 102 .byte 13 # DW_TAG_member 103 .byte 0 # DW_CHILDREN_no 104 .byte 3 # DW_AT_name 105 .byte 37 # DW_FORM_strx1 106 .byte 73 # DW_AT_type 107 .byte 19 # DW_FORM_ref4 108 .byte 58 # DW_AT_decl_file 109 .byte 11 # DW_FORM_data1 110 .byte 59 # DW_AT_decl_line 111 .byte 11 # DW_FORM_data1 112 .byte 56 # DW_AT_data_member_location 113 .byte 11 # DW_FORM_data1 114 .byte 0 # EOM(1) 115 .byte 0 # EOM(2) 116 .byte 4 # Abbreviation Code 117 .byte 36 # DW_TAG_base_type 118 .byte 0 # DW_CHILDREN_no 119 .byte 3 # DW_AT_name 120 .byte 37 # DW_FORM_strx1 121 .byte 62 # DW_AT_encoding 122 .byte 11 # DW_FORM_data1 123 .byte 11 # DW_AT_byte_size 124 .byte 11 # DW_FORM_data1 125 .byte 0 # EOM(1) 126 .byte 0 # EOM(2) 127 .byte 5 # Abbreviation Code 128 .byte 17 # DW_TAG_compile_unit 129 .byte 1 # DW_CHILDREN_yes 130 .byte 37 # DW_AT_producer 131 .byte 37 # DW_FORM_strx1 132 .byte 19 # DW_AT_language 133 .byte 5 # DW_FORM_data2 134 .byte 3 # DW_AT_name 135 .byte 37 # DW_FORM_strx1 136 .byte 114 # DW_AT_str_offsets_base 137 .byte 23 # DW_FORM_sec_offset 138 .byte 16 # DW_AT_stmt_list 139 .byte 23 # DW_FORM_sec_offset 140 .byte 27 # DW_AT_comp_dir 141 .byte 37 # DW_FORM_strx1 142 .ascii "\264B" # DW_AT_GNU_pubnames 143 .byte 25 # DW_FORM_flag_present 144 .byte 17 # DW_AT_low_pc 145 .byte 27 # DW_FORM_addrx 146 .byte 18 # DW_AT_high_pc 147 .byte 6 # DW_FORM_data4 148 .byte 115 # DW_AT_addr_base 149 .byte 23 # DW_FORM_sec_offset 150 .byte 0 # EOM(1) 151 .byte 0 # EOM(2) 152 .byte 6 # Abbreviation Code 153 .byte 46 # DW_TAG_subprogram 154 .byte 1 # DW_CHILDREN_yes 155 .byte 17 # DW_AT_low_pc 156 .byte 27 # DW_FORM_addrx 157 .byte 18 # DW_AT_high_pc 158 .byte 6 # DW_FORM_data4 159 .byte 64 # DW_AT_frame_base 160 .byte 24 # DW_FORM_exprloc 161 .byte 110 # DW_AT_linkage_name 162 .byte 37 # DW_FORM_strx1 163 .byte 3 # DW_AT_name 164 .byte 37 # DW_FORM_strx1 165 .byte 58 # DW_AT_decl_file 166 .byte 11 # DW_FORM_data1 167 .byte 59 # DW_AT_decl_line 168 .byte 11 # DW_FORM_data1 169 .byte 73 # DW_AT_type 170 .byte 19 # DW_FORM_ref4 171 .byte 63 # DW_AT_external 172 .byte 25 # DW_FORM_flag_present 173 .byte 0 # EOM(1) 174 .byte 0 # EOM(2) 175 .byte 7 # Abbreviation Code 176 .byte 52 # DW_TAG_variable 177 .byte 0 # DW_CHILDREN_no 178 .byte 2 # DW_AT_location 179 .byte 24 # DW_FORM_exprloc 180 .byte 3 # DW_AT_name 181 .byte 37 # DW_FORM_strx1 182 .byte 58 # DW_AT_decl_file 183 .byte 11 # DW_FORM_data1 184 .byte 59 # DW_AT_decl_line 185 .byte 11 # DW_FORM_data1 186 .byte 73 # DW_AT_type 187 .byte 19 # DW_FORM_ref4 188 .byte 0 # EOM(1) 189 .byte 0 # EOM(2) 190 .byte 8 # Abbreviation Code 191 .byte 22 # DW_TAG_typedef 192 .byte 0 # DW_CHILDREN_no 193 .byte 73 # DW_AT_type 194 .byte 19 # DW_FORM_ref4 195 .byte 3 # DW_AT_name 196 .byte 37 # DW_FORM_strx1 197 .byte 58 # DW_AT_decl_file 198 .byte 11 # DW_FORM_data1 199 .byte 59 # DW_AT_decl_line 200 .byte 11 # DW_FORM_data1 201 .byte 0 # EOM(1) 202 .byte 0 # EOM(2) 203 .byte 9 # Abbreviation Code 204 .byte 19 # DW_TAG_structure_type 205 .byte 0 # DW_CHILDREN_no 206 .byte 60 # DW_AT_declaration 207 .byte 25 # DW_FORM_flag_present 208 .byte 105 # DW_AT_signature 209 .byte 32 # DW_FORM_ref_sig8 210 .byte 0 # EOM(1) 211 .byte 0 # EOM(2) 212 .byte 0 # EOM(3) 213 .section .debug_info,"",@progbits 214.Lcu_begin0: 215 .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit 216.Ldebug_info_start1: 217 .short 5 # DWARF version number 218 .byte 1 # DWARF Unit Type 219 .byte 8 # Address Size (in bytes) 220 .long .debug_abbrev # Offset Into Abbrev. Section 221 .byte 5 # Abbrev [5] 0xc:0x49 DW_TAG_compile_unit 222 .byte 0 # DW_AT_producer 223 .short 33 # DW_AT_language 224 .byte 1 # DW_AT_name 225 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base 226 .long .Lline_table_start0 # DW_AT_stmt_list 227 .byte 2 # DW_AT_comp_dir 228 # DW_AT_GNU_pubnames 229 .byte 0 # DW_AT_low_pc 230 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 231 .long .Laddr_table_base0 # DW_AT_addr_base 232 .byte 6 # Abbrev [6] 0x23:0x1c DW_TAG_subprogram 233 .byte 0 # DW_AT_low_pc 234 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 235 .byte 1 # DW_AT_frame_base 236 .byte 86 237 .byte 3 # DW_AT_linkage_name 238 .byte 4 # DW_AT_name 239 .byte 0 # DW_AT_decl_file 240 .byte 7 # DW_AT_decl_line 241 .long 63 # DW_AT_type 242 # DW_AT_external 243 .byte 7 # Abbrev [7] 0x33:0xb DW_TAG_variable 244 .byte 2 # DW_AT_location 245 .byte 145 246 .byte 120 247 .byte 6 # DW_AT_name 248 .byte 0 # DW_AT_decl_file 249 .byte 8 # DW_AT_decl_line 250 .long 67 # DW_AT_type 251 .byte 0 # End Of Children Mark 252 .byte 4 # Abbrev [4] 0x3f:0x4 DW_TAG_base_type 253 .byte 5 # DW_AT_name 254 .byte 5 # DW_AT_encoding 255 .byte 4 # DW_AT_byte_size 256 .byte 8 # Abbrev [8] 0x43:0x8 DW_TAG_typedef 257 .long 75 # DW_AT_type 258 .byte 10 # DW_AT_name 259 .byte 0 # DW_AT_decl_file 260 .byte 5 # DW_AT_decl_line 261 .byte 9 # Abbrev [9] 0x4b:0x9 DW_TAG_structure_type 262 # DW_AT_declaration 263 .quad 69467852836524312 # DW_AT_signature 264 .byte 0 # End Of Children Mark 265.Ldebug_info_end1: 266 .section .debug_str_offsets,"",@progbits 267 .long 48 # Length of String Offsets Set 268 .short 5 269 .short 0 270.Lstr_offsets_base0: 271 .section .debug_str,"MS",@progbits,1 272.Linfo_string0: 273 .asciz "clang version 15.0.0" # string offset=0 274.Linfo_string1: 275 .asciz "helper.cpp" # string offset=146 276.Linfo_string2: 277 .asciz "/dwarf5-gdb-index-test" # string offset=157 278.Linfo_string3: 279 .asciz "_Z3foov" # string offset=217 280.Linfo_string4: 281 .asciz "foo" # string offset=225 282.Linfo_string5: 283 .asciz "int" # string offset=229 284.Linfo_string6: 285 .asciz "s" # string offset=233 286.Linfo_string7: 287 .asciz "a" # string offset=235 288.Linfo_string8: 289 .asciz "unsigned int" # string offset=237 290.Linfo_string9: 291 .asciz "b" # string offset=250 292.Linfo_string10: 293 .asciz "S2" # string offset=252 294 .section .debug_str_offsets,"",@progbits 295 .long .Linfo_string0 296 .long .Linfo_string1 297 .long .Linfo_string2 298 .long .Linfo_string3 299 .long .Linfo_string4 300 .long .Linfo_string5 301 .long .Linfo_string6 302 .long .Linfo_string7 303 .long .Linfo_string8 304 .long .Linfo_string9 305 .long .Linfo_string10 306 .section .debug_addr,"",@progbits 307 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution 308.Ldebug_addr_start0: 309 .short 5 # DWARF version number 310 .byte 8 # Address size 311 .byte 0 # Segment selector size 312.Laddr_table_base0: 313 .quad .Lfunc_begin0 314.Ldebug_addr_end0: 315 .section .debug_gnu_pubnames,"",@progbits 316 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info 317.LpubNames_start0: 318 .short 2 # DWARF Version 319 .long .Lcu_begin0 # Offset of Compilation Unit Info 320 .long 85 # Compilation Unit Length 321 .long 35 # DIE offset 322 .byte 48 # Attributes: FUNCTION, EXTERNAL 323 .asciz "foo" # External Name 324 .long 0 # End Mark 325.LpubNames_end0: 326 .section .debug_gnu_pubtypes,"",@progbits 327 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info 328.LpubTypes_start0: 329 .short 2 # DWARF Version 330 .long .Lcu_begin0 # Offset of Compilation Unit Info 331 .long 85 # Compilation Unit Length 332 .long 67 # DIE offset 333 .byte 144 # Attributes: TYPE, STATIC 334 .asciz "S2" # External Name 335 .long 63 # DIE offset 336 .byte 144 # Attributes: TYPE, STATIC 337 .asciz "int" # External Name 338 .long 12 # DIE offset 339 .byte 16 # Attributes: TYPE, EXTERNAL 340 .asciz "unsigned int" # External Name 341 .long 0 # End Mark 342.LpubTypes_end0: 343 .ident "clang version 15.0.0" 344 .section ".note.GNU-stack","",@progbits 345 .addrsig 346 .section .debug_line,"",@progbits 347.Lline_table_start0: 348