[lkml]   [2004]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: ptrace single-stepping change breaks Wine

    On Mon, 22 Nov 2004, Andreas Schwab wrote:
    > Linus Torvalds <> writes:
    > > Now, try to "strace" it, or debug it with gdb, and see if you can repeat
    > > the behaviour.
    > You'll always have hard time repeating that under strace or gdb, since a
    > debugger uses SIGTRAP for it's own purpose and does not pass it to the
    > program.

    Sure. But "hard time" and "impossible" are two different things.

    It _should_ be perfectly easy to debug this, by using

    signal SIGTRAP

    instead of "continue" when you get a SIGTRAP that wasn't due to anything
    you did.

    But try it. It doesn't work. Why? Because the kernel will have cleared TF
    on the signal stack, so even when you do a "signal SIGTRAP", it will only
    run the trap handler _once_, even though it should run it three times
    (once for each instruction in between the "popfl"s.

    I do think this is actually a bug, although whether it's the bug that
    causes problems for Wine is not clear at all. I'mm too lazy to build
    and boot an older kernel, but I bet that on an older kernel you _can_ do
    "signal SIGTRAP" three times, and it will work correctly. That would
    indeed make this a regression.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2009-11-18 23:46    [W:0.021 / U:472.576 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site