brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.2 KiB · e02a8a5 Raw
162 lines · plain
1# RUN: llvm-mc %S/Inputs/debug_rnglists_short_section.s -filetype obj -triple x86_64-pc-linux -o - | \2# RUN: not llvm-dwarfdump --debug-rnglists - 2>&1 | FileCheck %s --check-prefix=SHORT3# SHORT-NOT: error:4# SHORT-NOT: range list header5# SHORT: error: parsing .debug_rnglists table at offset 0x0: unexpected end of data at offset 0x36# SHORT-NOT: range list header7# SHORT-NOT: error:8 9# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o - | \10# RUN: not llvm-dwarfdump --debug-rnglists - 2> %t.err | FileCheck %s --check-prefix=GOOD11# RUN: FileCheck %s --input-file %t.err12 13# GOOD: .debug_rnglists contents:14# GOOD-NEXT: range list header: length = 0x0000001e, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x0000000115# GOOD-NEXT: offsets: [16# GOOD-NEXT:    0x0000000417# GOOD-NEXT: ]18# GOOD-NEXT: ranges:19# GOOD-NEXT: [0x0000000000000010, 0x0000000000000020)20# GOOD-NEXT: <End of list>21# GOOD-NEXT: range list header: length = 0x0000001a, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x0000000022# GOOD-NEXT: ranges:23# GOOD-NEXT: [0x0000000000000030, 0x0000000000000040)24# GOOD-NEXT: <End of list>25# GOOD-NOT:  range list header26 27# CHECK-NOT: error:28# CHECK: error: .debug_rnglists table at offset 0x22 has too small length (0xb) to contain a complete header29# CHECK-NEXT: error: unrecognised .debug_rnglists table version 4 in table at offset 0x2d30# CHECK-NEXT: error: .debug_rnglists table at offset 0x39 has unsupported address size: 331# CHECK-NEXT: error: .debug_rnglists table at offset 0x45 has unsupported segment selector size 432# CHECK-NEXT: error: .debug_rnglists table at offset 0x51 has more offset entries (12345678) than there is space for33# CHECK-NEXT: error: read past end of table when reading DW_RLE_start_end encoding at offset 0x6934# CHECK-NEXT: error: read past end of table when reading DW_RLE_start_length encoding at offset 0x8235# CHECK-NEXT: error: unknown rnglists encoding 0x2a at offset 0x9836# CHECK-NEXT: error: no end of list marker detected at end of .debug_rnglists table starting at offset 0xaa37# CHECK-NEXT: error: section is not large enough to contain a .debug_rnglists table of length 0x1f at offset 0xe538# CHECK-NOT: error:39 40.section .debug_rnglists,"",@progbits41 42# Table 1 (good)43.long 30 # Table length44.short 5 # Version45.byte 8  # Address size46.byte 0  # Segment selector size47.long 1  # Offset entry count48 49# Offsets50.long 451 52# First range list53.byte 6         # DW_RLE_start_length54.quad 0x10, 0x20   # Encoding payload55.byte 0         # DW_RLE_end_of_list56 57# Table 2 (length too small for header)58.long 7  # Table length59.short 5 # Version60.byte 8  # Address size61.byte 0  # Segment selector size62.byte 0, 0, 0  # Truncated offset entry count63 64# Table 3 (unknown version)65.long 8  # Table length66.short 4 # Version67.byte 8  # Address size68.byte 0  # Segment selector size69.long 0  # Offset entry count70 71# Table 4 (unsupported address size)72.long 8  # Table length73.short 5 # Version74.byte 3  # Address size75.byte 0  # Segment selector size76.long 0  # Offset entry count77 78# Table 5 (unsupported segment selector size)79.long 8  # Table length80.short 5 # Version81.byte 8  # Address size82.byte 4  # Segment selector size83.long 0  # Offset entry count84 85# Table 6 (bad offset entry count)86.long 8  # Table length87.short 5 # Version88.byte 8  # Address size89.byte 0  # Segment selector size90.long 12345678  # Offset entry count91 92# Table 7 (malformed DW_RLE_start_end)93.long 21 # Table length94.short 5 # Version95.byte 8  # Address size96.byte 0  # Segment selector size97.long 0  # Offset entry count98 99# First range list100.byte 6          # DW_RLE_start_end101.quad 1            # Start address102.long 4            # Truncated end address103 104# Table 8 (malformed DW_RLE_start_length)105.long 18 # Table length106.short 5 # Version107.byte 8  # Address size108.byte 0  # Segment selector size109.long 0  # Offset entry count110 111# First range list112.byte 7          # DW_RLE_start_length113.quad 1            # Start address114.byte 0xFF         # Length - invalid ULEB, so will continue reading past the end115 116# Table 9 (unknown encoding)117.long 26 # Table length118.short 5 # Version119.byte 8  # Address size120.byte 0  # Segment selector size121.long 0  # Offset entry count122 123# First range list124.byte 42         # Unknown encoding125.quad 0x10, 0x20   # Encoding payload126.byte 0          # DW_RLE_end_of_list127 128# Table 10 (missing end of list marker)129.long 25 # Table length130.short 5 # Version131.byte 8  # Address size132.byte 0  # Segment selector size133.long 0  # Offset entry count134 135# First range list136.byte 6         # DW_RLE_start_length137.quad 0x10, 0x20   # Encoding payload138 139# Table 11 (good)140.long 26 # Table length141.short 5 # Version142.byte 8  # Address size143.byte 0  # Segment selector size144.long 0  # Offset entry count145 146# First range list147.byte 6         # DW_RLE_start_length148.quad 0x30, 0x40   # Encoding payload149.byte 0         # DW_RLE_end_of_list150 151# Table 12 (length too long)152.long 27 # Table length - 1 greater than actual contents153.short 5 # Version154.byte 8  # Address size155.byte 0  # Segment selector size156.long 0  # Offset entry count157 158# First range list159.byte 6          # DW_RLE_start_end160.quad 1, 2         # Start, end address161.byte 0          # DW_RLE_end_of_list162