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