brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.6 KiB · c670204 Raw
206 lines · plain
1## This test checks debug info for the types located into the2## different compilation units from the single object file.3## Type definition for the "class1" should be moved to the4## artificial type unit from the first and second compilation unit.5 6# RUN: yaml2obj %s -o %t.o7# RUN: echo '---' > %t2.map8# RUN: echo "triple:          'x86_64-apple-darwin'" >> %t2.map9# RUN: echo 'objects:'  >> %t2.map10# RUN: echo " -  filename: '%t.o'" >> %t2.map11# RUN: echo '    symbols:' >> %t2.map12# RUN: echo '      - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t2.map13# RUN: echo '...' >> %t2.map14# RUN: dsymutil --linker parallel -y %t2.map -f -o - | llvm-dwarfdump -a - | FileCheck %s15 16# CHECK: file format Mach-O 64-bit x86-6417# CHECK: .debug_info contents:18# CHECK: Compile Unit:19# CHECK: DW_TAG_compile_unit20# CHECK: DW_AT_name{{.*}}"__artificial_type_unit"21# CHECK: 0x[[CLASS1:[0-9a-f]*]]: DW_TAG_class_type{{.*[[:space:]].*}}DW_AT_name{{.*}}"class1"22 23# CHECK: Compile Unit:24# CHECK: DW_TAG_compile_unit25# CHECK: DW_AT_name{{.*}}"CU1"26# CHECK-NOT: DW_TAG_class_type27# CHECK: DW_TAG_variable28# CHECK: DW_AT_name{{.*}}"var1"29# CHECK: DW_AT_const_value30# CHECK: DW_AT_type (0x00000000[[CLASS1]]31 32# CHECK: Compile Unit:33# CHECK: DW_TAG_compile_unit34# CHECK: DW_AT_name{{.*}}"CU2"35# CHECK-NOT: DW_TAG_class_type36# CHECK-NOT: "class1"37# CHECK: DW_TAG_variable38# CHECK: DW_AT_name{{.*}}"var2"39# CHECK: DW_AT_const_value40# CHECK: DW_AT_type (0x00000000[[CLASS1]]41 42 43 44--- !mach-o45FileHeader:46  magic:      0xFEEDFACF47  cputype:    0x0100000748  cpusubtype: 0x0000000349  filetype:   0x0000000150  ncmds:      251  sizeofcmds: 37652  flags:      0x0000200053  reserved:   0x0000000054LoadCommands:55  - cmd:      LC_SEGMENT_6456    cmdsize:  23257    segname:  ''58    vmaddr:   0x0059    vmsize:   0x30060    fileoff:  0x30061    filesize: 0x30062    maxprot:  763    initprot: 764    nsects:   265    flags:    066    Sections:67      - sectname:  __debug_abbrev68        segname:   __DWARF69        addr:      0x000000000000000F70        size:      0x3c71        offset:    0x0000038072        align:     073        reloff:    0x0000000074        nreloc:    075        flags:     0x0200000076        reserved1: 0x0000000077        reserved2: 0x0000000078        reserved3: 0x0000000079      - sectname:  __debug_info80        segname:   __DWARF81        addr:      0x00000000000010082        size:      0x6283        offset:    0x0000041084        align:     085        reloff:    0x0000060086        nreloc:    187        flags:     0x0200000088        reserved1: 0x0000000089        reserved2: 0x0000000090        reserved3: 0x0000000091        relocations:92          - address:         0x1FC93            symbolnum:       194            pcrel:           true95            length:          396            extern:          true97            type:            098            scattered:       false99            value:           0100  - cmd:             LC_SYMTAB101    cmdsize:         24102    symoff:          0x700103    nsyms:           2104    stroff:          0x720105    strsize:         10106LinkEditData:107  NameList:108    - n_strx:          1109      n_type:          0x0F110      n_sect:          1111      n_desc:          0112      n_value:         0113    - n_strx:          1114      n_type:          0x0F115      n_sect:          1116      n_desc:          0117      n_value:         0118  StringTable:119    - ''120    - '__Z3foov'121    - ''122DWARF:123  debug_abbrev:124    - Table:125      - Tag:      DW_TAG_compile_unit126        Children: DW_CHILDREN_yes127        Attributes:128          - Attribute: DW_AT_producer129            Form:      DW_FORM_string130          - Attribute: DW_AT_language131            Form:      DW_FORM_data2132          - Attribute: DW_AT_name133            Form:      DW_FORM_string134      - Tag:      DW_TAG_class_type135        Children: DW_CHILDREN_no136        Attributes:137          - Attribute: DW_AT_name138            Form:      DW_FORM_string139      - Tag:      DW_TAG_variable140        Children: DW_CHILDREN_no141        Attributes:142          - Attribute: DW_AT_name143            Form:      DW_FORM_string144          - Attribute: DW_AT_const_value145            Form:      DW_FORM_data4146          - Attribute: DW_AT_type147            Form:      DW_FORM_ref4148    - Table:149      - Tag:      DW_TAG_compile_unit150        Children: DW_CHILDREN_yes151        Attributes:152          - Attribute: DW_AT_producer153            Form:      DW_FORM_string154          - Attribute: DW_AT_language155            Form:      DW_FORM_data2156          - Attribute: DW_AT_name157            Form:      DW_FORM_string158      - Tag:      DW_TAG_class_type159        Children: DW_CHILDREN_no160        Attributes:161          - Attribute: DW_AT_name162            Form:      DW_FORM_string163      - Tag:      DW_TAG_variable164        Children: DW_CHILDREN_no165        Attributes:166          - Attribute: DW_AT_name167            Form:      DW_FORM_string168          - Attribute: DW_AT_const_value169            Form:      DW_FORM_data4170          - Attribute: DW_AT_type171            Form:      DW_FORM_ref4172  debug_info:173    - Version: 4174      Entries:175        - AbbrCode: 1176          Values:177            - CStr: by_hand178            - Value:  0x04179            - CStr: CU1180        - AbbrCode: 2181          Values:182            - CStr: class1183        - AbbrCode: 3184          Values:185            - CStr: var1186            - Value:  0x00000000187            - Value:  0x0000001a188        - AbbrCode: 0189    - Version: 4190      Entries:191        - AbbrCode: 1192          Values:193            - CStr: by_hand194            - Value:  0x04195            - CStr: CU2196        - AbbrCode: 2197          Values:198            - CStr: class1199        - AbbrCode: 3200          Values:201            - CStr: var2202            - Value:  0x00000000203            - Value:  0x0000001a204        - AbbrCode: 0205...206