An easier fix may be to have the script exec the debugger instead of launching it as a child process; this way the debugger parent pid will be the original Wine process, and everything should work fine.
well, this has a major holes: - since the process creation in Wine knows the created process is not a PE image, it doesn't set the info on the server side for the newly created process ; after the exec in the shell script, the info cannot be retrieved from the parent, hence an error
furthermore, the event used to synchronize the debugger startup with the exception handler no longer works (mainly because the inheritage is not done thru the preceding step
perhaps, the best fix would be to merge the init_process/new_process server calls
A+