226 lines · plain
1# clang++ helper.cpp -g2 -gsplit-dwarf -S -fdebug-compilation-dir=.2# Modified assembly so that DW_AT_dwo_name has a partial path.3# int foo() { return 0; }4 .text5 .file "helper.cpp"6 .globl _Z3foov # -- Begin function _Z3foov7 .p2align 4, 0x908 .type _Z3foov,@function9_Z3foov: # @_Z3foov10.Lfunc_begin0:11 .file 0 "." "helper.cpp" md5 0xde8d315e6d1f74ad53575cef6507e77012 .loc 0 1 0 # helper.cpp:1:013 .cfi_startproc14# %bb.0: # %entry15 pushq %rbp16 .cfi_def_cfa_offset 1617 .cfi_offset %rbp, -1618 movq %rsp, %rbp19 .cfi_def_cfa_register %rbp20.Ltmp0:21 .loc 0 1 13 prologue_end # helper.cpp:1:1322 xorl %eax, %eax23 .loc 0 1 13 epilogue_begin is_stmt 0 # helper.cpp:1:1324 popq %rbp25 .cfi_def_cfa %rsp, 826 retq27.Ltmp1:28.Lfunc_end0:29 .size _Z3foov, .Lfunc_end0-_Z3foov30 .cfi_endproc31 # -- End function32 .section .debug_abbrev,"",@progbits33 .byte 1 # Abbreviation Code34 .byte 74 # DW_TAG_skeleton_unit35 .byte 0 # DW_CHILDREN_no36 .byte 16 # DW_AT_stmt_list37 .byte 23 # DW_FORM_sec_offset38 .byte 114 # DW_AT_str_offsets_base39 .byte 23 # DW_FORM_sec_offset40 .byte 27 # DW_AT_comp_dir41 .byte 37 # DW_FORM_strx142 .ascii "\264B" # DW_AT_GNU_pubnames43 .byte 25 # DW_FORM_flag_present44 .byte 118 # DW_AT_dwo_name45 .byte 37 # DW_FORM_strx146 .byte 17 # DW_AT_low_pc47 .byte 27 # DW_FORM_addrx48 .byte 18 # DW_AT_high_pc49 .byte 6 # DW_FORM_data450 .byte 115 # DW_AT_addr_base51 .byte 23 # DW_FORM_sec_offset52 .byte 0 # EOM(1)53 .byte 0 # EOM(2)54 .byte 0 # EOM(3)55 .section .debug_info,"",@progbits56.Lcu_begin0:57 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit58.Ldebug_info_start0:59 .short 5 # DWARF version number60 .byte 4 # DWARF Unit Type61 .byte 8 # Address Size (in bytes)62 .long .debug_abbrev # Offset Into Abbrev. Section63 .quad -136066516364763829264 .byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit65 .long .Lline_table_start0 # DW_AT_stmt_list66 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base67 .byte 0 # DW_AT_comp_dir68 # DW_AT_GNU_pubnames69 .byte 1 # DW_AT_dwo_name70 .byte 0 # DW_AT_low_pc71 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc72 .long .Laddr_table_base0 # DW_AT_addr_base73.Ldebug_info_end0:74 .section .debug_str_offsets,"",@progbits75 .long 12 # Length of String Offsets Set76 .short 577 .short 078.Lstr_offsets_base0:79 .section .debug_str,"MS",@progbits,180.Lskel_string0:81 .asciz "." # string offset=082.Lskel_string1:83 .asciz "objects/o2/split.dwo" # string offset=2 <-- Manually modified.84 .section .debug_str_offsets,"",@progbits85 .long .Lskel_string086 .long .Lskel_string187 .section .debug_str_offsets.dwo,"e",@progbits88 .long 28 # Length of String Offsets Set89 .short 590 .short 091 .section .debug_str.dwo,"eMS",@progbits,192.Linfo_string0:93 .asciz "_Z3foov" # string offset=094.Linfo_string1:95 .asciz "foo" # string offset=896.Linfo_string2:97 .asciz "int" # string offset=1298.Linfo_string3:99 .asciz "clang version 18.0.0" # string offset=16100.Linfo_string4:101 .asciz "helper.cpp" # string offset=37102.Linfo_string5:103 .asciz "objects/o2/split.dwo" # string offset=48 <-- Manually modified.104 .section .debug_str_offsets.dwo,"e",@progbits105 .long 0106 .long 8107 .long 12108 .long 16109 .long 37110 .long 48111 .section .debug_info.dwo,"e",@progbits112 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit113.Ldebug_info_dwo_start0:114 .short 5 # DWARF version number115 .byte 5 # DWARF Unit Type116 .byte 8 # Address Size (in bytes)117 .long 0 # Offset Into Abbrev. Section118 .quad -1360665163647638292119 .byte 1 # Abbrev [1] 0x14:0x1b DW_TAG_compile_unit120 .byte 3 # DW_AT_producer121 .short 33 # DW_AT_language122 .byte 4 # DW_AT_name123 .byte 5 # DW_AT_dwo_name124 .byte 2 # Abbrev [2] 0x1a:0x10 DW_TAG_subprogram125 .byte 0 # DW_AT_low_pc126 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc127 .byte 1 # DW_AT_frame_base128 .byte 86129 .byte 0 # DW_AT_linkage_name130 .byte 1 # DW_AT_name131 .byte 0 # DW_AT_decl_file132 .byte 1 # DW_AT_decl_line133 .long 42 # DW_AT_type134 # DW_AT_external135 .byte 3 # Abbrev [3] 0x2a:0x4 DW_TAG_base_type136 .byte 2 # DW_AT_name137 .byte 5 # DW_AT_encoding138 .byte 4 # DW_AT_byte_size139 .byte 0 # End Of Children Mark140.Ldebug_info_dwo_end0:141 .section .debug_abbrev.dwo,"e",@progbits142 .byte 1 # Abbreviation Code143 .byte 17 # DW_TAG_compile_unit144 .byte 1 # DW_CHILDREN_yes145 .byte 37 # DW_AT_producer146 .byte 37 # DW_FORM_strx1147 .byte 19 # DW_AT_language148 .byte 5 # DW_FORM_data2149 .byte 3 # DW_AT_name150 .byte 37 # DW_FORM_strx1151 .byte 118 # DW_AT_dwo_name152 .byte 37 # DW_FORM_strx1153 .byte 0 # EOM(1)154 .byte 0 # EOM(2)155 .byte 2 # Abbreviation Code156 .byte 46 # DW_TAG_subprogram157 .byte 0 # DW_CHILDREN_no158 .byte 17 # DW_AT_low_pc159 .byte 27 # DW_FORM_addrx160 .byte 18 # DW_AT_high_pc161 .byte 6 # DW_FORM_data4162 .byte 64 # DW_AT_frame_base163 .byte 24 # DW_FORM_exprloc164 .byte 110 # DW_AT_linkage_name165 .byte 37 # DW_FORM_strx1166 .byte 3 # DW_AT_name167 .byte 37 # DW_FORM_strx1168 .byte 58 # DW_AT_decl_file169 .byte 11 # DW_FORM_data1170 .byte 59 # DW_AT_decl_line171 .byte 11 # DW_FORM_data1172 .byte 73 # DW_AT_type173 .byte 19 # DW_FORM_ref4174 .byte 63 # DW_AT_external175 .byte 25 # DW_FORM_flag_present176 .byte 0 # EOM(1)177 .byte 0 # EOM(2)178 .byte 3 # Abbreviation Code179 .byte 36 # DW_TAG_base_type180 .byte 0 # DW_CHILDREN_no181 .byte 3 # DW_AT_name182 .byte 37 # DW_FORM_strx1183 .byte 62 # DW_AT_encoding184 .byte 11 # DW_FORM_data1185 .byte 11 # DW_AT_byte_size186 .byte 11 # DW_FORM_data1187 .byte 0 # EOM(1)188 .byte 0 # EOM(2)189 .byte 0 # EOM(3)190 .section .debug_addr,"",@progbits191 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution192.Ldebug_addr_start0:193 .short 5 # DWARF version number194 .byte 8 # Address size195 .byte 0 # Segment selector size196.Laddr_table_base0:197 .quad .Lfunc_begin0198.Ldebug_addr_end0:199 .section .debug_gnu_pubnames,"",@progbits200 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info201.LpubNames_start0:202 .short 2 # DWARF Version203 .long .Lcu_begin0 # Offset of Compilation Unit Info204 .long 40 # Compilation Unit Length205 .long 26 # DIE offset206 .byte 48 # Attributes: FUNCTION, EXTERNAL207 .asciz "foo" # External Name208 .long 0 # End Mark209.LpubNames_end0:210 .section .debug_gnu_pubtypes,"",@progbits211 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info212.LpubTypes_start0:213 .short 2 # DWARF Version214 .long .Lcu_begin0 # Offset of Compilation Unit Info215 .long 40 # Compilation Unit Length216 .long 42 # DIE offset217 .byte 144 # Attributes: TYPE, STATIC218 .asciz "int" # External Name219 .long 0 # End Mark220.LpubTypes_end0:221 .ident "clang version 18.0.0"222 .section ".note.GNU-stack","",@progbits223 .addrsig224 .section .debug_line,"",@progbits225.Lline_table_start0:226