[PATCH 3/4] ntdll: Add CFI expressions for __wine_syscall_dispatcher.

Rémi Bernon rbernon at codeweavers.com
Wed Feb 9 07:40:34 CST 2022


On 2/9/22 14:29, Jinoh Kang wrote:
> On 2/8/22 04:05, Rémi Bernon wrote:
>> Making sure stack pointer points to previous syscall / exit frame before
>> entering a syscall, and restoring the PE frame information on return.
> 
> Would this unwind into the PE side?
> I don't thunk libunwind would be able to handle SEH unwind infos; perhaps what we want to do instead is to unwind into exit_frame?
> 
> If what we indeed want is to unwind to PE, I have a much accurate (albeit ugly) version for the CFI expressions.
> 

As far as I understand and from Alexandre feedback we don't want to let 
pthread / libunwind unwind the PE frames at all.

As we current don't care too much what happens on thread exit (I'm not 
sure what is supposed to happen on the PE side of the threads), I'm only 
trying to unwind the unix frames here.

So, the syscall frames, any unix-side call frames that could be there, 
and the eventual nested syscall frames, up to the exit frame.

> It supports:
> - dual fxsave / xsave handling (the bulk of the complexity)
> - can unwind from every point inside the syscall dispatcher
> - works with GDB (attach to wine via normal GDB, and it will trace through the PE up to the initial frame)
> 

That's nice, I've been able to have GDB cross the syscall dispatcher 
with a much simpler version, basically doing the same as here but 
pointing to the PE frame instead.

Then maybe it doesn't work on every instruction of the dispatcher, and 
it also isn't compatible with this patch ofc.

Cheers,
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list