File: debug_line_short_prologue.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 (68 lines) | stat: -rw-r--r-- 2,960 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
## 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,C2

# 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,OK

# ALL:      debug_line[0x00000000]
# C0-NEXT:  warning: parsing line table prologue at 0x00000000 found an invalid directory or file table description at 0x00000027
# C0-NEXT:  warning: failed to parse entry content descriptors: unexpected end of data at offset 0x27
# C1-NEXT:  warning: parsing line table prologue at 0x00000000 found an invalid directory or file table description at 0x0000002a
# C1-NEXT:  warning: failed to parse entry content descriptors: unable to decode LEB128 at offset 0x0000002a: malformed uleb128, extends past end
# C2-NEXT:  warning: parsing line table prologue at 0x00000000 found an invalid directory or file table description at 0x0000002b
# C2-NEXT:  warning: failed to parse entry content descriptors: unable to decode LEB128 at offset 0x0000002b: malformed uleb128, extends past end
# ALL:      include_directories[  0] = "/tmp"
# OK:       file_names[  0]:
# OK-NEXT:             name: "foo"
# OK-NEXT:        dir_index: 0

.section .debug_line,"",@progbits
.long   .Lend-.Lstart   # Length of Unit
.Lstart:
.short  5               # DWARF version number
.byte   8               # Address Size
.byte   0               # Segment Selector Size
.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
# Directory table format
.byte   1               # One element per directory entry
.byte   1               # DW_LNCT_path
.byte   0x08            # DW_FORM_string
# Directory table entries
.byte   1               # 1 directory
.asciz  "/tmp"
# File table format
.if CASE >= 1
.byte   2               # 2 elements per file entry
.byte   1               # DW_LNCT_path
.byte   8               # DW_FORM_string
.if CASE >= 2
.byte   2               # DW_LNCT_directory_index
.if CASE >= 3
.byte   11              # DW_FORM_data1
# File table entries
.byte   1
.asciz  "foo"
.byte   0
.endif
.endif
.endif

.Lprologue_end:
.Lend: