47 lines · plain
1# REQUIRES: x862 3# RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml -o %t4# RUN: %lldb -c %t \5# RUN: -o "target symbols add %S/Inputs/unwind-via-raSearch.syms" \6# RUN: -s %s -b | FileCheck %s7 8# First check that unwind plan generation works correctly.9# This function has a "typical" unwind rule.10image show-unwind -n call_many11# CHECK-LABEL: image show-unwind -n call_many12# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`call_many13# CHECK: Symbol file UnwindPlan:14# CHECK: This UnwindPlan originally sourced from breakpad STACK WIN15# 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-4221)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_deref20 21image show-unwind -n nonzero_frame_size22# CHECK-LABEL: image show-unwind -n nonzero_frame_size23# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`nonzero_frame_size24# 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_deref26 27# Then, some invalid rules.28image show-unwind -n complex_rasearch29# CHECK-LABEL: image show-unwind -n complex_rasearch30# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`complex_rasearch31# CHECK-NOT: Symbol file32 33image show-unwind -n esp_rasearch34# CHECK-LABEL: image show-unwind -n esp_rasearch35# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`esp_rasearch36# CHECK-NOT: Symbol file37 38# And finally, check that backtracing works as a whole by unwinding a simple39# stack.40thread backtrace41# CHECK-LABEL: thread backtrace42# CHECK: frame #0: 0x000b1092 unwind-via-stack-win.exe`many_pointer_args43# CHECK: frame #1: 0x000b1079 unwind-via-stack-win.exe`call_many + 10544# CHECK: frame #2: 0x000b1085 unwind-via-stack-win.exe`main + 545# CHECK: frame #3: 0x77278494 kernel32.dll46# CHECK-NOT: frame47