David Lassonde wrote:
>
> Hi everybody,
>
> we are having a bug with the debugger, which is that the process we want
> to debug is killed with a SIGSTOP before we begin to debug it. The bug
> appeared at the time we were merging a lot of server code in our tree.
>
> I narrowed the problem down to a call to DEBUG_Freeze that is ultimately
> trying to stop all the processes except the current one. I noticed that Eric
> removed the DEBUG_Freeze function from the winehq tree (on march 8th), so I
> did the same, and it worked.
>
> Here are my explanations to the phenomenon:
>
> -The thread who was stopping the others changed when we merged
> the server code, and we should not stop the threads according to the same
> algorithm
>
> or
>
> - We really do not need the DEBUG_Freeze anymore, and we forgot
> to remove the code at merge time..
>
> Any ideas?
before answering, here's a quick overview of that has changed (in signal handling)
for the debugger
before :
- process (from Unix standpoint) A got a signal
- the signal handler is called
- an exception is raised thru rtl functions
- the debugger is entered on the context of process A
- DEBUG_Freeze is called to stopped all the threads of the current process (from the
windows standpoint)
now :
- process (from Unix standpoint) A got a signal
- the signal handler is called
- an exception is sent to the wine server
- in the server, if the current windows process is debugged, then the exception
is queued for removal for the debugger, and all the threads of the current process
(from the windows standpoint) are stopped from the wineserver
so, DEBUG_Freeze is no longer needed (its behavior has been included in the server)
also note that the exception queueing and the threads' stop is an atomic operation
(from the server standpoint). but, it doesn't mean that all threads are stopped
when the exception occurs, it means that all threads are stopped when the exception
is queued in the server
HTH
A+
--
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle