brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.7 KiB · 26d85f5 Raw
239 lines · plain
1# RUN: yaml2obj %s -o %t.o2# RUN: echo '---' > %t2.map3# RUN: echo "triple:          'x86_64-apple-darwin'" >> %t2.map4# RUN: echo 'objects:'  >> %t2.map5# RUN: echo " -  filename: '%t.o'" >> %t2.map6# RUN: echo '    symbols:' >> %t2.map7# RUN: echo '      - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t2.map8# RUN: echo '...' >> %t2.map9# RUN: dsymutil --linker=parallel -y %t2.map -f -o - | llvm-dwarfdump -a - | FileCheck %s10 11## This test checks debug info for the equally named structures from12## different namespaces. The result should contain two variables which13## reference different types("A::C1::I1 *const" and "B::C1::I1 *const")14 15# CHECK: file format Mach-O 64-bit x86-6416# CHECK: .debug_info contents:17# CHECK: Compile Unit:18# CHECK: DW_TAG_compile_unit19# CHECK: DW_AT_name{{.*}}"__artificial_type_unit"20 21# CHECK: 0x[[INT:[0-9a-f]*]]: DW_TAG_base_type22# CHECK: DW_AT_name{{.*}}"int"23 24# CHECK: DW_TAG_namespace{{.*[[:space:]].*}}DW_AT_name{{.*}}"A"25 26# CHECK: 0x[[A_C1:[0-9a-f]*]]: DW_TAG_structure_type27# CHECK: DW_AT_name{{.*}}"C1"28# CHECK: DW_TAG_member29# CHECK: DW_AT_type{{.*}}0x[[INT]] "int"30# CHECK: DW_AT_name{{.*}}"I1"31 32# CHECK: DW_TAG_namespace{{.*[[:space:]].*}}DW_AT_name{{.*}}"B"33 34# CHECK: 0x[[B_C1:[0-9a-f]*]]: DW_TAG_structure_type35# CHECK: DW_AT_name{{.*}}"C1"36# CHECK: DW_TAG_member37# CHECK: DW_AT_type{{.*}}0x[[INT]] "int"38# CHECK: DW_AT_name{{.*}}"I1"39 40# CHECK: 0x[[PTR_A_C1:[0-9a-f]*]]: DW_TAG_pointer_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[A_C1:[0-9a-f]*]] "A::C1"41 42# CHECK: 0x[[PTR_B_C1:[0-9a-f]*]]: DW_TAG_pointer_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[B_C1:[0-9a-f]*]] "B::C1"43 44# CHECK: 0x[[CONST_A_C1:[0-9a-f]*]]: DW_TAG_const_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[PTR_A_C1]] "A::C1 *"45 46# CHECK: 0x[[CONST_B_C1:[0-9a-f]*]]: DW_TAG_const_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[PTR_B_C1]] "B::C1 *"47 48# CHECK: DW_TAG_compile_unit49# CHECK: DW_TAG_variable50# CHECK: DW_AT_name{{.*}}"var1"51# CHECK: DW_AT_type{{.*}}0x00000000[[CONST_A_C1]] "A::C1 *const"52# CHECK: DW_TAG_variable53# CHECK: DW_AT_name{{.*}}"var2"54# CHECK: DW_AT_type{{.*}}0x00000000[[CONST_B_C1]] "B::C1 *const"55 56 57--- !mach-o58FileHeader:59  magic:      0xFEEDFACF60  cputype:    0x0100000761  cpusubtype: 0x0000000362  filetype:   0x0000000163  ncmds:      264  sizeofcmds: 37665  flags:      0x0000200066  reserved:   0x0000000067LoadCommands:68  - cmd:      LC_SEGMENT_6469    cmdsize:  23270    segname:  ''71    vmaddr:   0x0072    vmsize:   0x30073    fileoff:  0x30074    filesize: 0x30075    maxprot:  776    initprot: 777    nsects:   278    flags:    079    Sections:80      - sectname:  __debug_abbrev81        segname:   __DWARF82        addr:      0x000000000000000F83        size:      0x4184        offset:    0x0000038085        align:     086        reloff:    0x0000000087        nreloc:    088        flags:     0x0200000089        reserved1: 0x0000000090        reserved2: 0x0000000091        reserved3: 0x0000000092      - sectname:  __debug_info93        segname:   __DWARF94        addr:      0x00000000000010095        size:      0x6e96        offset:    0x000003C197        align:     098        reloff:    0x0000060099        nreloc:    1100        flags:     0x02000000101        reserved1: 0x00000000102        reserved2: 0x00000000103        reserved3: 0x00000000104        relocations:105          - address:         0x000001FC106            symbolnum:       1107            pcrel:           true108            length:          3109            extern:          false110            type:            0111            scattered:       false112            value:           0113  - cmd:             LC_SYMTAB114    cmdsize:         24115    symoff:          0x700116    nsyms:           1117    stroff:          0x710118    strsize:         10119LinkEditData:120  NameList:121    - n_strx:          1122      n_type:          0x0F123      n_sect:          1124      n_desc:          0125      n_value:         0126  StringTable:127    - ''128    - '__Z3foov'129    - ''130DWARF:131  debug_abbrev:132    - Table:133      - Tag:      DW_TAG_compile_unit134        Children: DW_CHILDREN_yes135        Attributes:136          - Attribute: DW_AT_producer137            Form:      DW_FORM_string138          - Attribute: DW_AT_language139            Form:      DW_FORM_data2140      - Tag:      DW_TAG_namespace141        Children: DW_CHILDREN_yes142        Attributes:143          - Attribute: DW_AT_name144            Form:      DW_FORM_string145      - Tag:      DW_TAG_structure_type146        Children: DW_CHILDREN_yes147        Attributes:148          - Attribute: DW_AT_name149            Form:      DW_FORM_string150      - Tag:      DW_TAG_member151        Children: DW_CHILDREN_no152        Attributes:153          - Attribute: DW_AT_type154            Form:      DW_FORM_ref_addr155          - Attribute: DW_AT_name156            Form:      DW_FORM_string157      - Tag:      DW_TAG_base_type158        Children: DW_CHILDREN_no159        Attributes:160          - Attribute: DW_AT_name161            Form:      DW_FORM_string162      - Tag:      DW_TAG_pointer_type163        Children: DW_CHILDREN_no164        Attributes:165          - Attribute: DW_AT_type166            Form:      DW_FORM_ref_addr167      - Tag:      DW_TAG_const_type168        Children: DW_CHILDREN_no169        Attributes:170          - Attribute: DW_AT_type171            Form:      DW_FORM_ref_addr172      - Tag:      DW_TAG_variable173        Children: DW_CHILDREN_no174        Attributes:175          - Attribute: DW_AT_name176            Form:      DW_FORM_string177          - Attribute: DW_AT_const_value178            Form:      DW_FORM_data4179          - Attribute: DW_AT_type180            Form:      DW_FORM_ref_addr181  debug_info:182    - Version: 4183      Entries:184        - AbbrCode: 1185          Values:186            - CStr: by_hand187            - Value:  0x04188        - AbbrCode: 2189          Values:190            - CStr: A191        - AbbrCode: 3192          Values:193            - CStr: C1194        - AbbrCode: 4195          Values:196            - Value:  0x00000038197            - CStr: I1198        - AbbrCode: 0199        - AbbrCode: 0200        - AbbrCode: 2201          Values:202            - CStr: B203        - AbbrCode: 3204          Values:205            - CStr: C1206        - AbbrCode: 4207          Values:208            - Value:  0x00000038209            - CStr: I1210        - AbbrCode: 0211        - AbbrCode: 0212        - AbbrCode: 5213          Values:214            - CStr: int215        - AbbrCode: 6216          Values:217            - Value:  0x00000019218        - AbbrCode: 6219          Values:220            - Value:  0x0000002a221        - AbbrCode: 7222          Values:223            - Value:  0x0000003D224        - AbbrCode: 7225          Values:226            - Value:  0x00000042227        - AbbrCode: 8228          Values:229            - CStr: var1230            - Value:  0x00000000231            - Value:  0x00000047232        - AbbrCode: 8233          Values:234            - CStr: var2235            - Value:  0x00000000236            - Value:  0x0000004C237        - AbbrCode: 0238...239