3 # RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml -o %t
5 # RUN: -o "target symbols add %S/Inputs/unwind-via-raSearch.syms" \
6 # RUN: -s %s -b | FileCheck %s
8 # First check that unwind plan generation works correctly.
9 # This function has a "typical" unwind rule.
10 image show-unwind -n call_many
11 # CHECK-LABEL: image show-unwind -n call_many
12 # CHECK: UNWIND PLANS for unwind-via-stack-win.exe`call_many
13 # CHECK: Symbol file UnwindPlan:
14 # CHECK: This UnwindPlan originally sourced from breakpad STACK WIN
15 # CHECK: This UnwindPlan is sourced from the compiler: yes.
16 # CHECK: This UnwindPlan is valid at all instruction locations: no.
17 # CHECK: This UnwindPlan is for a trap handler function: no.
18 # CHECK: Address range of this UnwindPlan: [unwind-via-stack-win.exe..module_image + 4112-0x0000107d)
19 # 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
21 image show-unwind -n nonzero_frame_size
22 # CHECK-LABEL: image show-unwind -n nonzero_frame_size
23 # CHECK: UNWIND PLANS for unwind-via-stack-win.exe`nonzero_frame_size
24 # CHECK: Symbol file UnwindPlan:
25 # 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
27 # Then, some invalid rules.
28 image show-unwind -n complex_rasearch
29 # CHECK-LABEL: image show-unwind -n complex_rasearch
30 # CHECK: UNWIND PLANS for unwind-via-stack-win.exe`complex_rasearch
31 # CHECK-NOT: Symbol file
33 image show-unwind -n esp_rasearch
34 # CHECK-LABEL: image show-unwind -n esp_rasearch
35 # CHECK: UNWIND PLANS for unwind-via-stack-win.exe`esp_rasearch
36 # CHECK-NOT: Symbol file
38 # And finally, check that backtracing works as a whole by unwinding a simple
41 # CHECK-LABEL: thread backtrace
42 # CHECK: frame #0: 0x000b1092 unwind-via-stack-win.exe`many_pointer_args
43 # CHECK: frame #1: 0x000b1079 unwind-via-stack-win.exe`call_many + 105
44 # CHECK: frame #2: 0x000b1085 unwind-via-stack-win.exe`main + 5
45 # CHECK: frame #3: 0x77278494 kernel32.dll