brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 1bdc640 Raw
61 lines · yaml
1# RUN: rm -rf %t && split-file %s %t2# RUN: yaml2obj %t/v5.yaml -o %t/v5.o3# RUN: not llvm-dwarfdump -debug-str-offsets -verify %t/v5.o | FileCheck %s4# RUN: yaml2obj %t/v4.yaml -o %t/v4.o5# RUN: not llvm-dwarfdump -debug-str-offsets -verify %t/v4.o | FileCheck --check-prefix=V4 %s6 7#      CHECK: Verifying .debug_abbrev...8#      CHECK: Verifying .debug_str_offsets...9# CHECK-NEXT: error: .debug_str_offsets: contribution 0x0: index 0x2: invalid string offset *0x10 == 0x1, is neither zero nor immediately following a null character10# CHECK-NEXT: error: .debug_str_offsets: contribution 0x0: index 0x3: invalid string offset *0x14 == 0x42, is beyond the bounds of the string section of length 0x811# CHECK-NEXT: error: .debug_str_offsets: contribution 0x18: invalid version 4212# CHECK-NEXT: error: .debug_str_offsets: contribution 0x20: invalid length ((length (0x5) - header (0x4)) % offset size 0x4 == 0x1 != 0)13# CHECK-NEXT: error: .debug_str_offsets: contribution 0x29: length exceeds available space (contribution offset (0x29) + length field space (0x4) + length (0x5000000) == 0x500002D > section size 0x30)14# Errors detected.15 16# V4: error: .debug_str_offsets.dwo: contribution 0x0: index 0x2: invalid string offset *0x8 == 0x2, is neither zero nor immediately following a null character17 18 19#--- v4.yaml20--- !ELF21FileHeader:22  Class: ELFCLASS6423  Data:  ELFDATA2LSB24  Type:  ET_EXEC25DWARF:26Sections:27  - Name: '.debug_info.dwo'28    Type: SHT_PROGBITS29    Content: "0700000004000000000004"30  - Name: '.debug_str_offsets.dwo'31    Type: SHT_PROGBITS32    Content: "000000000400000002000000"33  - Name: 'debug_str.dwo'34    Type: SHT_PROGBITS35    Content: "666F6F0062617200"36 37 38#--- v5.yaml39--- !ELF40FileHeader:41  Class: ELFCLASS6442  Data:  ELFDATA2LSB43  Type:  ET_EXEC44DWARF:45  debug_str:46    - 'foo'47    - 'bar'48  debug_info:49    - Version: 550      UnitType:        DW_UT_compile51      AddrSize:        852  debug_str_offsets:53    - Offsets:54        - 0x0000000055        - 0x0000000456        - 0x0000000157        - 0x0000004258    - Version: 4259    - Length: 560    - Length: 861