ntdll: Add CFI unwind info to __wine_syscall_dispatcher (i386).
commit53c4f638ef6edb7386e6e8973c59be75ae7b97dc
authorJinoh Kang <jinoh.kang.kr@gmail.com>
Thu, 3 Nov 2022 13:57:22 +0000 (3 22:57 +0900)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 4 Nov 2022 18:23:56 +0000 (4 19:23 +0100)
tree40aedd4deb05f3ec8b767083bd62237fc247ec80
parent5aa2d45adf356ef60329722620d7f6a56dc36ab8
ntdll: Add CFI unwind info to __wine_syscall_dispatcher (i386).

This change is adding DWARF (CFI) unwind information to the
hand-written assembly of the `__wine_syscall_dispatcher` function.
This enables unwinding through the dispatcher from the Linux stack
into (and through) the Windows stack.

The general idea is that the `syscall_frame` struct contains the
content of the callee-save registers before the function call
(in particular the stack pointer and the return address).  At any
point of the execution, we have a pointer into the `syscall_frame`
in $ebx, $ecx, $ebp, or $esp.

For the CFI codes the general idea is that we are defining the
computations of the callee-save registers based on the
`syscall_frame` using DWARF’s `breg` instruction, rather than
relative to CFA.
dlls/ntdll/unix/dwarf.h
dlls/ntdll/unix/signal_i386.c