brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.0 KiB · a17b3e5 Raw
93 lines · yaml
1# RUN: yaml2obj %s -o %t.o2# RUN: llvm-dwarfdump --statistics %t.o 2>&1 | FileCheck %s3# RUN: rm %t.o4 5## Check that we are covering the situation when a stat field overflows.6##7## The yaml represents this DWARF:8##9## DW_TAG_compile_unit10##   DW_AT_low_pc (0x0000000000000000)11##   DW_AT_high_pc  (0x000000000000000b)12##13##   DW_TAG_subprogram14##     DW_AT_low_pc (0x0000000000000000)15##     DW_AT_high_pc  (0xffffffffffffffff)16##       DW_TAG_variable17##         DW_AT_location (0x00000023:18##            [0x0000000000000003, 0x0000000000000005): DW_OP_reg2 RCX)19##   DW_TAG_subprogram20##     DW_AT_low_pc    (0x0000000000000000)21##     DW_AT_high_pc   (0xffffffffffffffff)22##     DW_TAG_variable23##       DW_AT_location        (0x00000023:24##             [0x0000000000000003, 0x0000000000000005): DW_OP_reg2 RCX)25 26# CHECK: "sum_all_variables(#bytes in parent scope)": "overflowed"27 28--- !ELF29FileHeader:30  Class:   ELFCLASS[[BITS=64]]31  Data:    ELFDATA2LSB32  Type:    ET_EXEC33  Machine: EM_X86_6434Sections:35  - Name:         .debug_loc36    Type:         SHT_PROGBITS37    AddressAlign: 0x0138    Content:      '00000000000000000600000000000000010055000000000000000000000000000000000300000000000000050000000000000001005200000000000000000000000000000000'39  - Name:         .debug_ranges40    Type:         SHT_PROGBITS41    AddressAlign: 0x0142    Content:      '000000000000000003000000000000000500000000000000080000000000000000000000000000000000000000000000'43DWARF:44  debug_abbrev:45    - Table:46      - Code:     147        Tag:      DW_TAG_compile_unit48        Children: DW_CHILDREN_yes49        Attributes:50          - Attribute: DW_AT_low_pc51            Form:      DW_FORM_addr52          - Attribute: DW_AT_high_pc53            Form:      DW_FORM_data854      - Code:     255        Tag:      DW_TAG_subprogram56        Children: DW_CHILDREN_yes57        Attributes:58          - Attribute: DW_AT_low_pc59            Form:      DW_FORM_addr60          - Attribute: DW_AT_high_pc61            Form:      DW_FORM_data862      - Code:     363        Tag:      DW_TAG_variable64        Children: DW_CHILDREN_no65        Attributes:66          - Attribute: DW_AT_location67            Form:      DW_FORM_sec_offset68  debug_info:69    - Version:    470      AbbrOffset: 0x0071      Entries:72        - AbbrCode: 1 ## DW_TAG_compile_unit73          Values:74            - Value: 0x00 ## DW_AT_low_pc75            - Value: 0x0b ## DW_AT_high_pc76        - AbbrCode: 2 ## DW_TAG_subprogram77          Values:78            - Value: 0x00 ## DW_AT_low_pc79            - Value: 0xFFFFFFFFFFFFFFFF ## DW_AT_high_pc80        - AbbrCode: 3 ## DW_TAG_variable81          Values:82            - Value: 0x23 ## DW_AT_sec_offset83        - AbbrCode: 0 ## NULL84        - AbbrCode: 2 ## DW_TAG_subprogram85          Values:86            - Value: 0x00 ## DW_AT_low_pc87            - Value: 0xFFFFFFFFFFFFFFFF ## DW_AT_high_pc88        - AbbrCode: 3 ## DW_TAG_variable89          Values:90            - Value: 0x23 ## DW_AT_sec_offset91        - AbbrCode: 0 ## NULL92        - AbbrCode: 0 ## NULL93