1 ## Test cases when we run into the end of section while parsing a line table
4 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=0 -o %t0
5 # RUN: llvm-dwarfdump -debug-line %t0 2>&1 | FileCheck %s --check-prefixes=ALL,C0
7 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=1 -o %t1
8 # RUN: llvm-dwarfdump -debug-line %t1 2>&1 | FileCheck %s --check-prefixes=ALL,C1
10 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=2 -o %t2
11 # RUN: llvm-dwarfdump -debug-line %t2 2>&1 | FileCheck %s --check-prefixes=ALL,C2
13 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=3 -o %t3
14 # RUN: llvm-dwarfdump -debug-line %t3 2>&1 | FileCheck %s --check-prefixes=ALL,OK
16 # ALL: debug_line[0x00000000]
17 # C0-NEXT: warning: parsing line table prologue at 0x00000000 found an invalid directory or file table description at 0x00000027
18 # C0-NEXT: warning: failed to parse entry content descriptors: unexpected end of data at offset 0x27
19 # C1-NEXT: warning: parsing line table prologue at 0x00000000 found an invalid directory or file table description at 0x0000002a
20 # C1-NEXT: warning: failed to parse entry content descriptors: unable to decode LEB128 at offset 0x0000002a: malformed uleb128, extends past end
21 # C2-NEXT: warning: parsing line table prologue at 0x00000000 found an invalid directory or file table description at 0x0000002b
22 # C2-NEXT: warning: failed to parse entry content descriptors: unable to decode LEB128 at offset 0x0000002b: malformed uleb128, extends past end
23 # ALL: include_directories[ 0] = "/tmp"
25 # OK-NEXT: name: "foo"
26 # OK-NEXT: dir_index: 0
28 .section .debug_line,"",@progbits
29 .long .Lend-.Lstart # Length of Unit
31 .short 5 # DWARF version number
32 .byte 8 # Address Size
33 .byte 0 # Segment Selector Size
34 .long .Lprologue_end-.Lprologue_start # Length of Prologue
36 .byte 1 # Minimum Instruction Length
37 .byte 1 # Maximum Operations per Instruction
38 .byte 1 # Default is_stmt
41 .byte 13 # Opcode Base
42 .byte 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 # Standard Opcode Lengths
43 # Directory table format
44 .byte 1 # One element per directory entry
45 .byte 1 # DW_LNCT_path
46 .byte 0x08 # DW_FORM_string
47 # Directory table entries
52 .byte 2 # 2 elements per file entry
53 .byte 1 # DW_LNCT_path
54 .byte 8 # DW_FORM_string
56 .byte 2 # DW_LNCT_directory_index
58 .byte 11 # DW_FORM_data1