File: unwind-via-raSearch.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 (46 lines) | stat: -rw-r--r-- 2,076 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
# REQUIRES: x86

# RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml -o %t
# RUN: %lldb -c %t \
# RUN:   -o "target symbols add %S/Inputs/unwind-via-raSearch.syms" \
# RUN:   -s %s -b | FileCheck %s

# First check that unwind plan generation works correctly.
# This function has a "typical" unwind rule.
image show-unwind -n call_many
# CHECK-LABEL: image show-unwind -n call_many
# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`call_many
# CHECK: Symbol file UnwindPlan:
# CHECK: This UnwindPlan originally sourced from breakpad STACK WIN
# CHECK: This UnwindPlan is sourced from the compiler: yes.
# CHECK: This UnwindPlan is valid at all instruction locations: no.
# CHECK: This UnwindPlan is for a trap handler function: no.
# CHECK: Address range of this UnwindPlan: [unwind-via-stack-win.exe..module_image + 4112-0x0000107d)
# CHECK: row[0]:    0: CFA=RaSearch@SP+0 => esp=DW_OP_pick 0x0, DW_OP_consts +4, DW_OP_plus  eip=DW_OP_pick 0x0, DW_OP_deref

image show-unwind -n nonzero_frame_size
# CHECK-LABEL: image show-unwind -n nonzero_frame_size
# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`nonzero_frame_size
# CHECK: Symbol file UnwindPlan:
# CHECK: row[0]:    0: CFA=RaSearch@SP+12 => esp=DW_OP_pick 0x0, DW_OP_consts +4, DW_OP_plus  eip=DW_OP_pick 0x0, DW_OP_deref

# Then, some invalid rules.
image show-unwind -n complex_rasearch
# CHECK-LABEL: image show-unwind -n complex_rasearch
# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`complex_rasearch
# CHECK-NOT: Symbol file

image show-unwind -n esp_rasearch
# CHECK-LABEL: image show-unwind -n esp_rasearch
# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`esp_rasearch
# CHECK-NOT: Symbol file

# And finally, check that backtracing works as a whole by unwinding a simple
# stack.
thread backtrace
# CHECK-LABEL: thread backtrace
# CHECK: frame #0: 0x000b1092 unwind-via-stack-win.exe`many_pointer_args
# CHECK: frame #1: 0x000b1079 unwind-via-stack-win.exe`call_many + 105
# CHECK: frame #2: 0x000b1085 unwind-via-stack-win.exe`main + 5
# CHECK: frame #3: 0x77278494 kernel32.dll
# CHECK-NOT: frame