Browse Source

When Terminate is called immediately mark the process as Expired.

After that ignore all callbacks except ExitProcess.  
Remove the process when ExitProcess is received.  
If it was last process reset debugger.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2927 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 18 years ago
parent
commit
92ed73cd40
  1. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process-StateControl.cs
  2. 1
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process.cs
  3. 1
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs
  4. 17
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallbackSwitch.cs

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process-StateControl.cs

@ -234,6 +234,8 @@ namespace Debugger @@ -234,6 +234,8 @@ namespace Debugger
// Stop&terminate - both must be called
corProcess.Stop(uint.MaxValue);
corProcess.Terminate(0);
this.NotifyHasExpired();
}
internal void SelectMostRecentStackFrameWithLoadedSymbols()

1
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process.cs

@ -45,7 +45,6 @@ namespace Debugger @@ -45,7 +45,6 @@ namespace Debugger
if (DebuggeeState != null) {
ExpireDebuggeeState();
}
debugger.RemoveProcess(this);
}
}

1
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs

@ -426,6 +426,7 @@ namespace Debugger @@ -426,6 +426,7 @@ namespace Debugger
process.TraceMessage("Callback: ExitProcess");
process.NotifyHasExpired();
process.Debugger.RemoveProcess(process);
}
#endregion

17
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallbackSwitch.cs

@ -55,6 +55,9 @@ namespace Debugger @@ -55,6 +55,9 @@ namespace Debugger
public ManagedCallback GetProcessCallbackInterface(ICorDebugProcess pProcess)
{
Process process = debugger.GetProcess(pProcess);
if (process.HasExpired) {
return null;
}
try {
int isRunning = process.CorProcess.IsRunning;
} catch (COMException e) {
@ -67,6 +70,12 @@ namespace Debugger @@ -67,6 +70,12 @@ namespace Debugger
return process.CallbackInterface;
}
public void ExitProcess(ICorDebugProcess pProcess)
{
ManagedCallback managedCallback = debugger.GetProcess(pProcess).CallbackInterface;
managedCallback.ExitProcess(pProcess);
}
#region Program folow control
public void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason)
@ -288,14 +297,6 @@ namespace Debugger @@ -288,14 +297,6 @@ namespace Debugger
}
}
public void ExitProcess(ICorDebugProcess pProcess)
{
ManagedCallback managedCallback = GetProcessCallbackInterface(pProcess);
if (managedCallback != null) {
managedCallback.ExitProcess(pProcess);
}
}
#endregion
#region ICorDebugManagedCallback2 Members

Loading…
Cancel
Save