brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.0 KiB · 692c9a1 Raw
94 lines · yaml
1# RUN: yaml2obj %s -o %t.o2# RUN: %llvm-locstats %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: warning: "sum_all_variables(#bytes in parent scope)" field overflowed.27# CHECK: PC ranges covered: tainted28 29--- !ELF30FileHeader:31  Class:   ELFCLASS[[BITS=64]]32  Data:    ELFDATA2LSB33  Type:    ET_EXEC34  Machine: EM_X86_6435Sections:36  - Name:         .debug_loc37    Type:         SHT_PROGBITS38    AddressAlign: 0x0139    Content:      '00000000000000000600000000000000010055000000000000000000000000000000000300000000000000050000000000000001005200000000000000000000000000000000'40  - Name:         .debug_ranges41    Type:         SHT_PROGBITS42    AddressAlign: 0x0143    Content:      '000000000000000003000000000000000500000000000000080000000000000000000000000000000000000000000000'44DWARF:45  debug_abbrev:46    - Table:47      - Code:     148        Tag:      DW_TAG_compile_unit49        Children: DW_CHILDREN_yes50        Attributes:51          - Attribute: DW_AT_low_pc52            Form:      DW_FORM_addr53          - Attribute: DW_AT_high_pc54            Form:      DW_FORM_data855      - Code:     256        Tag:      DW_TAG_subprogram57        Children: DW_CHILDREN_yes58        Attributes:59          - Attribute: DW_AT_low_pc60            Form:      DW_FORM_addr61          - Attribute: DW_AT_high_pc62            Form:      DW_FORM_data863      - Code:     364        Tag:      DW_TAG_variable65        Children: DW_CHILDREN_no66        Attributes:67          - Attribute: DW_AT_location68            Form:      DW_FORM_sec_offset69  debug_info:70    - Version:    471      AbbrOffset: 0x0072      Entries:73        - AbbrCode: 1 ## DW_TAG_compile_unit74          Values:75            - Value: 0x00 ## DW_AT_low_pc76            - Value: 0x0b ## DW_AT_high_pc77        - AbbrCode: 2 ## DW_TAG_subprogram78          Values:79            - Value: 0x00 ## DW_AT_low_pc80            - Value: 0xFFFFFFFFFFFFFFFF ## DW_AT_high_pc81        - AbbrCode: 3 ## DW_TAG_variable82          Values:83            - Value: 0x23 ## DW_AT_sec_offset84        - AbbrCode: 0 ## NULL85        - AbbrCode: 2 ## DW_TAG_subprogram86          Values:87            - Value: 0x00 ## DW_AT_low_pc88            - Value: 0xFFFFFFFFFFFFFFFF ## DW_AT_high_pc89        - AbbrCode: 3 ## DW_TAG_variable90          Values:91            - Value: 0x23 ## DW_AT_sec_offset92        - AbbrCode: 0 ## NULL93        - AbbrCode: 0 ## NULL94