ptrace single-stepping change breaks Wine
Jesse Allen
the3dfxdude at gmail.com
Wed Dec 29 13:40:53 CST 2004
On Wed, 29 Dec 2004 10:53:54 -0800 (PST), Linus Torvalds
<torvalds at osdl.org> wrote:
> Ok, I don't remember the context from the Wine lists (and it's not clear
> from the older emails I was cc'd on), so the "#3 signal.c" change
> description is a bit too vague. Jesse, willing to just point to the exact
> diff that you need to make Warcraft work for you (and then maybe Thomas
> Sailer can verify whether that part is indeed the one that causes him
> problems).
I have attached the diff attached in this message for the lkml.
>
> The code in question now does
>
> /*
> * Iff TF was set because the program is being single-stepped by a
> * debugger, don't save that information on the signal stack.. We
> * don't want debugging to change state.
> */
> eflags = regs->eflags;
> if (current->ptrace & PT_DTRACE)
> eflags &= ~TF_MASK;
> err |= __put_user(eflags, &sc->eflags);
>
> and I guess it originally never cleared it. True?
Yes.
>
> So does removing the conditional TF clear make everything work again?
>
Yes, as long as TIF_SINGLESTEP is not set in set_singlestep().
set_singlestep also sets PT_DTRACE, so as it now is, a call to the
set_singlestep function will make this condition true clearing TF when
run. So both the conditional TF clear and setting TIF_SINGLESTEP
needs to be removed, like I show in the diff. Making these changes
returns the code to a 2.6.8-ish resemblence.
For the wine people, I will try to upload the seh debug channel logs
as soon as possible.
Jesse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptrace-reverse.diff
Type: text/x-diff
Size: 1398 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20041229/dd7ea1f8/ptrace-reverse.bin
More information about the wine-devel
mailing list