brintos

brintos / llvm-project-archived public Read only

0
0
Text · 12.8 KiB · c2e8d16 Raw
468 lines · plain
1## This test checks that size of DW_AT_location attribute2## of the DW_FORM_block1 form is correctly written to the3## output.4 5# RUN: yaml2obj %s -o %t.o6# RUN: echo '---' > %t2.map7# RUN: echo "triple:          'x86_64-apple-darwin'" >> %t2.map8# RUN: echo 'objects:'  >> %t2.map9# RUN: echo " -  filename: '%t.o'" >> %t2.map10# RUN: echo '    symbols:' >> %t2.map11# RUN: echo '      - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t2.map12# RUN: echo '...' >> %t2.map13# RUN: dsymutil -y %t2.map -f -o - | llvm-dwarfdump -a --verbose - | FileCheck %s14# RUN: dsymutil --linker parallel -y %t2.map -f -o - | llvm-dwarfdump -a --verbose - | 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{{.*}}"CU1"21# CHECK: DW_TAG_variable22# CHECK: DW_AT_name {{.*}}"var1"23# CHECK: DW_AT_type {{.*}}"class1"24# CHECK:   DW_AT_location [DW_FORM_block1]  (DW_OP_const8u 0x{{.*}}, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address)25# CHECK: DW_TAG_variable26# CHECK: DW_AT_name {{.*}}"var2"27# CHECK: DW_AT_type {{.*}}"class1"28# CHECK:   DW_AT_location [DW_FORM_block]  (DW_OP_const8u 0x{{.*}}, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address)29# CHECK: DW_TAG_variable30# CHECK: DW_AT_name {{.*}}"var3"31# CHECK: DW_AT_type {{.*}}"class1"32#33 34--- !mach-o35FileHeader:36  magic:      0xFEEDFACF37  cputype:    0x0100000738  cpusubtype: 0x0000000339  filetype:   0x0000000140  ncmds:      241  sizeofcmds: 37642  flags:      0x0000200043  reserved:   0x0000000044LoadCommands:45  - cmd:      LC_SEGMENT_6446    cmdsize:  23247    segname:  ''48    vmaddr:   0x0049    vmsize:   0x30050    fileoff:  0x30051    filesize: 0x30052    maxprot:  753    initprot: 754    nsects:   255    flags:    056    Sections:57      - sectname:  __debug_abbrev58        segname:   __DWARF59        addr:      0x000000000000000F60        size:      0x3861        offset:    0x0000038062        align:     063        reloff:    0x0000000064        nreloc:    065        flags:     0x0200000066        reserved1: 0x0000000067        reserved2: 0x0000000068        reserved3: 0x0000000069      - sectname:  __debug_info70        segname:   __DWARF71        addr:      0x00000000000010072        size:      0x15e73        offset:    0x0000041074        align:     075        reloff:    0x0000060076        nreloc:    277        flags:     0x0200000078        reserved1: 0x0000000079        reserved2: 0x0000000080        reserved3: 0x0000000081        relocations:82          - address:         0x3083            symbolnum:       184            pcrel:           true85            length:          386            extern:          true87            type:            088            scattered:       false89            value:           090          - address:         0xc291            symbolnum:       192            pcrel:           true93            length:          394            extern:          true95            type:            096            scattered:       false97            value:           098  - cmd:             LC_SYMTAB99    cmdsize:         24100    symoff:          0x700101    nsyms:           2102    stroff:          0x720103    strsize:         10104LinkEditData:105  NameList:106    - n_strx:          1107      n_type:          0x0F108      n_sect:          1109      n_desc:          0110      n_value:         0111    - n_strx:          1112      n_type:          0x0F113      n_sect:          1114      n_desc:          0115      n_value:         0116  StringTable:117    - ''118    - '__Z3foov'119    - ''120DWARF:121  debug_abbrev:122    - Table:123      - Tag:      DW_TAG_compile_unit124        Children: DW_CHILDREN_yes125        Attributes:126          - Attribute: DW_AT_producer127            Form:      DW_FORM_string128          - Attribute: DW_AT_language129            Form:      DW_FORM_data2130          - Attribute: DW_AT_name131            Form:      DW_FORM_string132      - Tag:      DW_TAG_class_type133        Children: DW_CHILDREN_no134        Attributes:135          - Attribute: DW_AT_name136            Form:      DW_FORM_string137      - Tag:      DW_TAG_variable138        Children: DW_CHILDREN_no139        Attributes:140          - Attribute: DW_AT_name141            Form:      DW_FORM_string142          - Attribute: DW_AT_const_value143            Form:      DW_FORM_data4144          - Attribute: DW_AT_type145            Form:      DW_FORM_ref4146          - Attribute: DW_AT_location147            Form:      DW_FORM_block1148      - Tag:      DW_TAG_variable149        Children: DW_CHILDREN_no150        Attributes:151          - Attribute: DW_AT_name152            Form:      DW_FORM_string153          - Attribute: DW_AT_const_value154            Form:      DW_FORM_data4155          - Attribute: DW_AT_type156            Form:      DW_FORM_ref4157          - Attribute: DW_AT_location158            Form:      DW_FORM_block159      - Tag:      DW_TAG_variable160        Children: DW_CHILDREN_no161        Attributes:162          - Attribute: DW_AT_name163            Form:      DW_FORM_string164          - Attribute: DW_AT_const_value165            Form:      DW_FORM_data4166          - Attribute: DW_AT_type167            Form:      DW_FORM_ref4168  debug_info:169    - Version: 4170      Entries:171        - AbbrCode: 1172          Values:173            - CStr: by_hand174            - Value:  0x04175            - CStr: CU1176        - AbbrCode: 2177          Values:178            - CStr: class1179        - AbbrCode: 3180          Values:181            - CStr: var1182            - Value:  0x00000000183            - Value:  0x0000001a184            - BlockData:185                - 0x0e186                - 0x00187                - 0x20188                - 0x00189                - 0x00190                - 0x00191                - 0x00192                - 0x00193                - 0x00194                - 0x9b195                - 0x0e196                - 0x00197                - 0x20198                - 0x00199                - 0x00200                - 0x00201                - 0x00202                - 0x00203                - 0x00204                - 0x9b205                - 0x0e206                - 0x00207                - 0x20208                - 0x00209                - 0x00210                - 0x00211                - 0x00212                - 0x00213                - 0x00214                - 0x9b215                - 0x0e216                - 0x00217                - 0x20218                - 0x00219                - 0x00220                - 0x00221                - 0x00222                - 0x00223                - 0x00224                - 0x9b225                - 0x0e226                - 0x00227                - 0x20228                - 0x00229                - 0x00230                - 0x00231                - 0x00232                - 0x00233                - 0x00234                - 0x9b235                - 0x0e236                - 0x00237                - 0x20238                - 0x00239                - 0x00240                - 0x00241                - 0x00242                - 0x00243                - 0x00244                - 0x9b245                - 0x0e246                - 0x00247                - 0x20248                - 0x00249                - 0x00250                - 0x00251                - 0x00252                - 0x00253                - 0x00254                - 0x9b255                - 0x0e256                - 0x00257                - 0x20258                - 0x00259                - 0x00260                - 0x00261                - 0x00262                - 0x00263                - 0x00264                - 0x9b265                - 0x0e266                - 0x00267                - 0x20268                - 0x00269                - 0x00270                - 0x00271                - 0x00272                - 0x00273                - 0x00274                - 0x9b275                - 0x0e276                - 0x00277                - 0x20278                - 0x00279                - 0x00280                - 0x00281                - 0x00282                - 0x00283                - 0x00284                - 0x9b285                - 0x0e286                - 0x00287                - 0x20288                - 0x00289                - 0x00290                - 0x00291                - 0x00292                - 0x00293                - 0x00294                - 0x9b295                - 0x0e296                - 0x00297                - 0x20298                - 0x00299                - 0x00300                - 0x00301                - 0x00302                - 0x00303                - 0x00304                - 0x9b305                - 0x0e306                - 0x00307                - 0x20308                - 0x00309                - 0x00310                - 0x00311                - 0x00312                - 0x00313                - 0x00314                - 0x9b315        - AbbrCode: 4316          Values:317            - CStr: var2318            - Value:  0x00000000319            - Value:  0x0000001a320            - BlockData:321                - 0x0e322                - 0x00323                - 0x20324                - 0x00325                - 0x00326                - 0x00327                - 0x00328                - 0x00329                - 0x00330                - 0x9b331                - 0x0e332                - 0x00333                - 0x20334                - 0x00335                - 0x00336                - 0x00337                - 0x00338                - 0x00339                - 0x00340                - 0x9b341                - 0x0e342                - 0x00343                - 0x20344                - 0x00345                - 0x00346                - 0x00347                - 0x00348                - 0x00349                - 0x00350                - 0x9b351                - 0x0e352                - 0x00353                - 0x20354                - 0x00355                - 0x00356                - 0x00357                - 0x00358                - 0x00359                - 0x00360                - 0x9b361                - 0x0e362                - 0x00363                - 0x20364                - 0x00365                - 0x00366                - 0x00367                - 0x00368                - 0x00369                - 0x00370                - 0x9b371                - 0x0e372                - 0x00373                - 0x20374                - 0x00375                - 0x00376                - 0x00377                - 0x00378                - 0x00379                - 0x00380                - 0x9b381                - 0x0e382                - 0x00383                - 0x20384                - 0x00385                - 0x00386                - 0x00387                - 0x00388                - 0x00389                - 0x00390                - 0x9b391                - 0x0e392                - 0x00393                - 0x20394                - 0x00395                - 0x00396                - 0x00397                - 0x00398                - 0x00399                - 0x00400                - 0x9b401                - 0x0e402                - 0x00403                - 0x20404                - 0x00405                - 0x00406                - 0x00407                - 0x00408                - 0x00409                - 0x00410                - 0x9b411                - 0x0e412                - 0x00413                - 0x20414                - 0x00415                - 0x00416                - 0x00417                - 0x00418                - 0x00419                - 0x00420                - 0x9b421                - 0x0e422                - 0x00423                - 0x20424                - 0x00425                - 0x00426                - 0x00427                - 0x00428                - 0x00429                - 0x00430                - 0x9b431                - 0x0e432                - 0x00433                - 0x20434                - 0x00435                - 0x00436                - 0x00437                - 0x00438                - 0x00439                - 0x00440                - 0x9b441                - 0x0e442                - 0x00443                - 0x20444                - 0x00445                - 0x00446                - 0x00447                - 0x00448                - 0x00449                - 0x00450                - 0x9b451                - 0x0e452                - 0x00453                - 0x20454                - 0x00455                - 0x00456                - 0x00457                - 0x00458                - 0x00459                - 0x00460                - 0x9b461        - AbbrCode: 5462          Values:463            - CStr: var3464            - Value:  0x00000000465            - Value:  0x0000001a466        - AbbrCode: 0467...468