Kernel 2.6.9 - Issue Found
pouech-eric at wanadoo.fr
Sun Nov 14 04:16:39 CST 2004
Jesse Allen a écrit :
> On Sat, Nov 13, 2004 at 05:23:19PM -0700, Jesse Allen wrote:
>>Patch 1: ptrace single-stepping fix
>>Included in 2.6.9-rc1
>>By Davide Libenzi?
> corrected link:
This shall harm us...
Basically, when a program is traced by ptrace, and single stepping, the patches
allow to also single step in the program's SIGTRAP handler...
In Wine case:
- the handler is wine's implementation to send the single step event to wineserver
- our code implies that the handler is not seen from wineserver (basically, that
after executing the single step, the debugging event is sent to wine server)
To sum up, it's not a wine bug nor a linux bug, it's just a change in linux
behavior that breaks wine. Linux new approach is to say a signal handler is part
of the application, and should be traced (in a debugger for example) as a
regular function. Wine sees signal handler (at least SIGTRAP, SIGSEGV...) as
kernel plugs put in the application (NTDLL) and used to send back information to
Wine server. Those two options are not compatible.
IMO, the best option would be to add an option to turn on/off the behavior in
ptrace (to allow or not single stepping in signal handlers).
Fixing Wine would be doable, but somehow ugly (ie it would mean turning the TF
off in Wine server to let our handlers run...)
More information about the wine-devel