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,C1
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,C1
16 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=4 -o %t4
17 # RUN: llvm-dwarfdump -debug-line %t4 2>&1 | FileCheck %s --check-prefixes=ALL,C1
19 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=5 -o %t5
20 # RUN: llvm-dwarfdump -debug-line %t5 2>&1 | FileCheck %s --check-prefixes=ALL,OK
22 # ALL: debug_line[0x00000000]
24 # C0-NEXT: warning: parsing line table prologue at 0x00000000 found an invalid directory or file table description at 0x00000021
25 # C0-NEXT: warning: include directories table was not null terminated before the end of the prologue
26 # C0: include_directories[ 1] = "dir1"
28 # C1-NEXT: warning: parsing line table prologue at 0x00000000 found an invalid directory or file table description
29 # C1-NEXT: warning: file names table was not null terminated before the end of the prologue
30 # C1: include_directories[ 2] = "dir2"
31 # C1-NEXT: file_names[ 1]:
32 # C1-NEXT: name: "file1"
33 # C1-NEXT: dir_index: 1
34 # C1-NEXT: mod_time: 0x00000002
35 # C1-NEXT: length: 0x00000003
38 # OK-NEXT: name: "file2"
39 # OK-NEXT: dir_index: 1
40 # OK-NEXT: mod_time: 0x00000005
41 # OK-NEXT: length: 0x00000006
43 .section .debug_line,"",@progbits
44 .long .Lend-.Lstart # Length of Unit
46 .short 4 # DWARF version number
47 .long .Lprologue_end-.Lprologue_start # Length of Prologue
49 .byte 1 # Minimum Instruction Length
50 .byte 1 # Maximum Operations per Instruction
51 .byte 1 # Default is_stmt
54 .byte 13 # Opcode Base
55 .byte 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 # Standard Opcode Lengths
56 .asciz "dir1" # Include table
60 .asciz "file1" # File table