File: debug_line_short_prologue_v4.s

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (78 lines) | stat: -rw-r--r-- 2,829 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
## Test cases when we run into the end of section while parsing a line table
## prologue.

# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=0 -o %t0
# RUN: llvm-dwarfdump -debug-line %t0 2>&1 | FileCheck %s --check-prefixes=ALL,C0

# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=1 -o %t1
# RUN: llvm-dwarfdump -debug-line %t1 2>&1 | FileCheck %s --check-prefixes=ALL,C1

# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=2 -o %t2
# RUN: llvm-dwarfdump -debug-line %t2 2>&1 | FileCheck %s --check-prefixes=ALL,C1

# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=3 -o %t3
# RUN: llvm-dwarfdump -debug-line %t3 2>&1 | FileCheck %s --check-prefixes=ALL,C1

# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=4 -o %t4
# RUN: llvm-dwarfdump -debug-line %t4 2>&1 | FileCheck %s --check-prefixes=ALL,C1

# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj --defsym CASE=5 -o %t5
# RUN: llvm-dwarfdump -debug-line %t5 2>&1 | FileCheck %s --check-prefixes=ALL,OK

# ALL:      debug_line[0x00000000]

# C0-NEXT:  warning: parsing line table prologue at 0x00000000 found an invalid directory or file table description at 0x00000021
# C0-NEXT:  warning: include directories table was not null terminated before the end of the prologue
# C0:       include_directories[  1] = "dir1"

# C1-NEXT:  warning: parsing line table prologue at 0x00000000 found an invalid directory or file table description
# C1-NEXT:  warning: file names table was not null terminated before the end of the prologue
# C1:       include_directories[  2] = "dir2"
# C1-NEXT:  file_names[  1]:
# C1-NEXT:             name: "file1"
# C1-NEXT:        dir_index: 1
# C1-NEXT:         mod_time: 0x00000002
# C1-NEXT:           length: 0x00000003

# OK:       file_names[  2]:
# OK-NEXT:             name: "file2"
# OK-NEXT:        dir_index: 1
# OK-NEXT:         mod_time: 0x00000005
# OK-NEXT:           length: 0x00000006

.section .debug_line,"",@progbits
.long   .Lend-.Lstart   # Length of Unit
.Lstart:
.short  4               # DWARF version number
.long   .Lprologue_end-.Lprologue_start  # Length of Prologue
.Lprologue_start:
.byte   1               # Minimum Instruction Length
.byte   1               # Maximum Operations per Instruction
.byte   1               # Default is_stmt
.byte   -5              # Line Base
.byte   14              # Line Range
.byte   13              # Opcode Base
.byte   0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 # Standard Opcode Lengths
.asciz "dir1"           # Include table
.if CASE >= 1
.asciz "dir2"
.byte   0
.asciz "file1"          # File table
.byte   1, 2, 3
.if CASE >= 2
.asciz "file2"
.if CASE >= 3
.byte 1
.if CASE >= 4
.byte 5
.if CASE >= 5
.byte 6
.byte 0
.endif
.endif
.endif
.endif
.endif

.Lprologue_end:
.Lend: