1# Test unwinding through stack frames that aren't aligned to 16 bytes.
2# (In real world code, this happens when unwinding through
3# KiUserExceptionDispatcher and KiUserCallbackDispatcher in ntdll.dll.)
4
5# REQUIRES: target-x86_64, native, system-windows
6
7# RUN: %build %p/Inputs/windows-unaligned-x86_64.cpp %p/Inputs/windows-unaligned-x86_64-asm.s -o %t
8# RUN: %lldb %t -s %s -o exit | FileCheck %s
9
10# Future TODO: If %build could compile the source file in C mode, the symbol
11# name handling would be easier across msvc and mingw build configurations.
12# (In mingw mode, the extern C symbol "func" is printed as "::func" while
13# it's plain "func" in msvc mode. Without the extern C, it's "func(..." in
14# mingw mode, but "void __cdecl func(..." in msvc mode.)
15
16breakpoint set -n func
17# CHECK: Breakpoint 1: where = {{.*}}`{{(::)?}}func
18
19process launch
20# CHECK: stop reason = breakpoint 1.1
21
22thread backtrace
23# CHECK: frame #0: {{.*}}`{{(::)?}}func
24# CHECK: frame #1: {{.*}}`realign_stack
25# CHECK: frame #2: {{.*}}`call_func
26# CHECK: frame #3: {{.*}}`main
27