File: stack-cfi-parsing.test

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (53 lines) | stat: -rw-r--r-- 2,213 bytes parent folder | download | duplicates (17)
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
# RUN: yaml2obj %S/Inputs/stack-cfi-parsing.yaml -o %t
# RUN: %lldb -c %t -o "target symbols add %S/Inputs/stack-cfi-parsing.syms" \
# RUN:   -s %s -b | FileCheck %s

image show-unwind -n func0
# CHECK-LABEL: image show-unwind -n func0
# CHECK: Asynchronous (not restricted to call-sites) UnwindPlan is 'breakpad STACK CFI'
# CHECK: Synchronous (restricted to call-sites) UnwindPlan is 'breakpad STACK CFI'
# CHECK:      Symbol file UnwindPlan:
# CHECK-NEXT: This UnwindPlan originally sourced from breakpad STACK CFI
# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes.
# CHECK-NEXT: This UnwindPlan is valid at all instruction locations: no.
# CHECK-NEXT: This UnwindPlan is for a trap handler function: no.
# CHECK-NEXT: Address range of this UnwindPlan: [stack-cfi-parsing.out..module_image + 0-0x0000000000000002)
# CHECK-NEXT: row[0]:    0: CFA=DW_OP_breg7 +0 => rbp=DW_OP_breg7 +0 rip=DW_OP_pick 0x0
# CHECK-NEXT: row[1]:    1: CFA=DW_OP_breg7 +0 => rbx=DW_OP_breg2 +0 rbp=DW_OP_breg0 +0 rip=DW_OP_pick 0x0

# The following plans are all (syntactically) invalid for various reasons.
# Processing those should not cause a crash.

image show-unwind -n func2
# CHECK-LABEL: image show-unwind -n func2
# CHECK-NOT: Symbol file

image show-unwind -n func3
# CHECK-LABEL: image show-unwind -n func3
# CHECK-NOT: Symbol file

image show-unwind -n func4
# CHECK-LABEL: image show-unwind -n func4
# CHECK-NOT: Symbol file

image show-unwind -n func5
# CHECK-LABEL: image show-unwind -n func5
# CHECK-NOT: Symbol file

image show-unwind -n func6
# CHECK-LABEL: image show-unwind -n func6
# CHECK-NOT: Symbol file

image show-unwind -n func7
# CHECK-LABEL: image show-unwind -n func7
# CHECK-NOT: Symbol file

# Finally, try an unwind plan with just a single row
image show-unwind -n func9
# CHECK-LABEL: image show-unwind -n func9
# CHECK: Asynchronous (not restricted to call-sites) UnwindPlan is 'breakpad STACK CFI'
# CHECK: Synchronous (restricted to call-sites) UnwindPlan is 'breakpad STACK CFI'
# CHECK: Symbol file UnwindPlan:
# CHECK: Address range of this UnwindPlan: [stack-cfi-parsing.out..module_image + 9-0x000000000000000a)
# CHECK: row[0]:    0: CFA=DW_OP_breg6 +0 => rip=DW_OP_breg0 +0