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