On Wed Oct 26 04:02:15 2022 +0000, **** wrote:
Zebediah Figura replied on the mailing list:
On 10/25/22 22:20, Torge Matthies (@tmatthies) wrote: > On Tue Oct 25 21:11:03 2022 +0000, Zebediah Figura wrote: >> I was going to comment that this isn't a valid SEH prologue, but I guess >> it doesn't matter, since we do the same thing in the other Ki* >> functions. Perhaps those deserve a comment, or perhaps it's just clear >> enough that they're special... > Should I just remove it? We can't unwind / backtrace through here anyway, so this SEH directive is useless. > I don't think I can answer that without understanding why the SEH directives are there in the first place. Paul, since you wrote them, can you by chance explain?
The windows version can unwind properly. The way this is usually achieved is by putting unwind opcodes at offset 0 (ie as if you put the macros before the first instruction) that restore the registers, and then finally rsp and rip using a machine frame uwop. In wine, you'd probably want to restore the frame that exited the Windows world.