Browse Source

Fixed rude-abort of evals

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5302 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
David Srbecký 16 years ago
parent
commit
4bac8628c8
  1. 9
      src/AddIns/Debugger/Debugger.Core/Eval.cs

9
src/AddIns/Debugger/Debugger.Core/Eval.cs

@ -164,20 +164,21 @@ namespace Debugger @@ -164,20 +164,21 @@ namespace Debugger
try {
process.WaitForPause(TimeSpan.FromMilliseconds(500));
if (!Evaluated) {
state = EvalState.EvaluatedTimeOut;
process.TraceMessage("Aborting eval: " + Description);
this.CorEval.Abort();
process.WaitForPause(TimeSpan.FromMilliseconds(500));
process.WaitForPause(TimeSpan.FromMilliseconds(2500));
if (!Evaluated) {
process.TraceMessage("Rude aborting eval: " + Description);
this.CorEval2.RudeAbort();
process.WaitForPause(TimeSpan.FromMilliseconds(500));
process.WaitForPause(TimeSpan.FromMilliseconds(5000));
if (!Evaluated) {
throw new DebuggerException("Evaluation can not be stopped");
}
}
// Note that this sets Evaluated to true
state = EvalState.EvaluatedTimeOut;
}
process.WaitForPause();
process.AssertPaused();
return this.Result;
} catch (ProcessExitedException) {
throw new GetValueException("Process exited");

Loading…
Cancel
Save