@ -409,10 +409,17 @@ namespace Debugger
public void ExitThread ( ICorDebugAppDomain pAppDomain , ICorDebugThread pThread )
public void ExitThread ( ICorDebugAppDomain pAppDomain , ICorDebugThread pThread )
{
{
// It seems that ICorDebugThread is still not dead and can be used
// ICorDebugThread is still not dead and can be used for some operations
EnterCallback ( PausedReason . Other , "ExitThread " + pThread . ID , pThread ) ;
if ( process . ContainsThread ( pThread ) ) {
EnterCallback ( PausedReason . Other , "ExitThread " + pThread . ID , pThread ) ;
process . GetThread ( pThread ) . NotifyExited ( ) ;
process . GetThread ( pThread ) . NotifyExited ( ) ;
} else {
EnterCallback ( PausedReason . Other , "ExitThread " + pThread . ID , process . CorProcess ) ;
// TODO: Investigate
process . TraceMessage ( "ERROR: Thread does not exist " + pThread . ID ) ;
}
try {
try {
ExitCallback ( ) ;
ExitCallback ( ) ;