wine ptrace trouble
marcus at jet.franken.de
Sun Oct 23 16:12:08 CDT 2005
On Sun, Oct 23, 2005 at 08:33:40PM +0200, Peter Beutner wrote:
> I've been trying to get an older game(Heart Of Darkness) to work with wine.
> Appearently the game uses some kind of copy-protection(securom i suppose) which let wine
> abort with the following error: "Trace/breakpoint trap".
> After some debugging sessions I managed to reproduce the problem.
> See the attached program(debug.c, simply compile with mingw).
> The problem is the following(as far as I understand it):
> - app sets up an exception handler
> - enables single-step debugging -> exception handler get invoked
> - in the exception handler:- re-enables single-step debugging
> - modifies some debug register in the CONTEXT struct
> -> because of that set_thread_context ist called and wineserver PTRACE_ATTACH to the
> process, modifies these registers, then resumes the process
> - as wineserver doesn't detach from the process it will get the next SIGTRAP signal and
> appearently it seems to ignore that signal
> - [as nobody cares about the SIGTRAP signal the process get killed]
> I'm not completly sure about the last step and the fact what wineserver really does with
> the SIGTRAP signal.
Do you use a AMD64 machine? At least mine has some troubles
with ptrace on kernel 2.6.13 :/
More information about the wine-devel