Browse Source

Freeze all other threads during evaluation.

pull/59/merge
David Srbecký 12 years ago
parent
commit
0ef31e5117
  1. 2
      src/AddIns/Debugger/Debugger.Core/Eval.cs
  2. 1
      src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs
  3. 12
      src/AddIns/Debugger/Debugger.Core/Process.cs

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

@ -134,7 +134,7 @@ namespace Debugger
appDomain.Process.activeEvals.Add(this); appDomain.Process.activeEvals.Add(this);
appDomain.Process.AsyncContinue(DebuggeeStateAction.Keep); appDomain.Process.AsyncContinue(DebuggeeStateAction.Keep, evalThread);
} }
/// <exception cref="DebuggerException">Evaluation can not be stopped</exception> /// <exception cref="DebuggerException">Evaluation can not be stopped</exception>

1
src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs

@ -98,6 +98,7 @@ namespace Debugger
process.AsyncContinue(DebuggeeStateAction.Keep); process.AsyncContinue(DebuggeeStateAction.Keep);
} else if (process.Evaluating) { } else if (process.Evaluating) {
// Ignore events during property evaluation // Ignore events during property evaluation
pausedEventArgs = null;
process.AsyncContinue(DebuggeeStateAction.Keep); process.AsyncContinue(DebuggeeStateAction.Keep);
} else if (pauseOnNextExit) { } else if (pauseOnNextExit) {
// process.TraceMessage("Callback exit: Paused"); // process.TraceMessage("Callback exit: Paused");

12
src/AddIns/Debugger/Debugger.Core/Process.cs

@ -459,12 +459,18 @@ namespace Debugger
AsyncContinue(DebuggeeStateAction.Clear); AsyncContinue(DebuggeeStateAction.Clear);
} }
/// <param name="threadsToRun"> Null to keep current setting </param> /// <param name="threadToRun"> Run this thread and freeze all other threads </param>
/// <param name="newThreadState"> What happens to created threads. Null to keep current setting </param> internal void AsyncContinue(DebuggeeStateAction action, Thread threadToRun = null)
internal void AsyncContinue(DebuggeeStateAction action)
{ {
AssertPaused(); AssertPaused();
if (threadToRun != null) {
corProcess.SetAllThreadsDebugState(CorDebugThreadState.THREAD_SUSPEND, null);
threadToRun.CorThread.SetDebugState(CorDebugThreadState.THREAD_RUN);
} else {
corProcess.SetAllThreadsDebugState(CorDebugThreadState.THREAD_RUN, null);
}
NotifyResumed(action); NotifyResumed(action);
corProcess.Continue(0); corProcess.Continue(0);
// this.TraceMessage("Continue"); // this.TraceMessage("Continue");

Loading…
Cancel
Save