# RUN: yaml2obj %s -o %t.o # RUN: echo '---' > %t.map # RUN: echo "triple: 'x86_64-apple-darwin'" >> %t.map # RUN: echo 'objects:' >> %t.map # RUN: echo " - filename: '%t.o'" >> %t.map # RUN: echo ' symbols:' >> %t.map # RUN: echo ' - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t.map # RUN: echo '...' >> %t.map # RUN: dsymutil --linker classic -f -y %t.map -o - | llvm-dwarfdump --debug-info - | FileCheck %s # RUN: dsymutil --linker parallel -f -y %t.map -o - | llvm-dwarfdump --debug-info - | FileCheck %s ## Regression test: with -gline-tables-only, clang may emit a DW_TAG_subprogram ## with a demangled template-like DW_AT_name (e.g. "foo") but no ## DW_AT_linkage_name. dsymutil must not assert in this case. # CHECK: DW_TAG_compile_unit # CHECK: DW_AT_name{{.*}}"CU1" # CHECK: DW_TAG_subprogram # CHECK: DW_AT_name{{.*}}"foo" --- !mach-o FileHeader: magic: 0xFEEDFACF cputype: 0x01000007 cpusubtype: 0x00000003 filetype: 0x00000001 ncmds: 2 sizeofcmds: 296 flags: 0x00002000 reserved: 0x00000000 LoadCommands: - cmd: LC_SEGMENT_64 cmdsize: 232 segname: '' vmaddr: 0x00 vmsize: 0x200 fileoff: 0x200 filesize: 0x200 maxprot: 7 initprot: 7 nsects: 2 flags: 0 Sections: - sectname: __debug_abbrev segname: __DWARF addr: 0x0000000000000000 size: 0x20 offset: 0x00000280 align: 0 reloff: 0x00000000 nreloc: 0 flags: 0x02000000 reserved1: 0x00000000 reserved2: 0x00000000 reserved3: 0x00000000 - sectname: __debug_info segname: __DWARF addr: 0x0000000000000100 size: 0x32 offset: 0x000002A0 align: 0 reloff: 0x00000400 nreloc: 1 flags: 0x02000000 reserved1: 0x00000000 reserved2: 0x00000000 reserved3: 0x00000000 relocations: - address: 0x25 symbolnum: 0 pcrel: false length: 3 extern: true type: 0 scattered: false value: 0 - cmd: LC_SYMTAB cmdsize: 24 symoff: 0x500 nsyms: 1 stroff: 0x510 strsize: 10 LinkEditData: NameList: - n_strx: 1 n_type: 0x0F n_sect: 1 n_desc: 0 n_value: 0 StringTable: - '' - '__Z3foov' - '' DWARF: debug_abbrev: - Table: - Tag: DW_TAG_compile_unit Children: DW_CHILDREN_yes Attributes: - Attribute: DW_AT_producer Form: DW_FORM_string - Attribute: DW_AT_language Form: DW_FORM_data2 - Attribute: DW_AT_name Form: DW_FORM_string - Tag: DW_TAG_subprogram Children: DW_CHILDREN_no Attributes: - Attribute: DW_AT_name Form: DW_FORM_string - Attribute: DW_AT_external Form: DW_FORM_flag - Attribute: DW_AT_low_pc Form: DW_FORM_addr - Attribute: DW_AT_high_pc Form: DW_FORM_data4 debug_info: - Version: 4 Entries: - AbbrCode: 1 Values: - CStr: by_hand - Value: 0x04 - CStr: CU1 ## DW_TAG_subprogram with template-like DW_AT_name and no linkage name. - AbbrCode: 2 Values: - CStr: 'foo' - Value: 0x01 - Value: 0x0000000000000000 - Value: 0x00000010 - AbbrCode: 0 ...