/// <exception cref="DebuggerException">Evaluation can not be stopped</exception> /// <exception cref="GetValueException">Process exited</exception> private Value WaitForResult() { // Note that aborting is not supported for suspended threads try { process.WaitForPause(TimeSpan.FromMilliseconds(500)); if (!Evaluated) { process.TraceMessage("Aborting eval: " + Description); this.CorEval.Abort(); process.WaitForPause(TimeSpan.FromMilliseconds(2500)); if (!Evaluated) { process.TraceMessage("Rude aborting eval: " + Description); this.CorEval2.RudeAbort(); process.WaitForPause(TimeSpan.FromMilliseconds(5000)); if (!Evaluated) { if (Variables.Langue == "en") { throw new DebuggerException(VelerSoftware.SZC.Properties.Resources.Eval_Not_Stopped_EN); } else { throw new DebuggerException(VelerSoftware.SZC.Properties.Resources.Eval_Not_Stopped); } } } // Note that this sets Evaluated to true state = EvalState.EvaluatedTimeOut; } process.AssertPaused(); return(this.Result); } catch (ProcessExitedException) { if (Variables.Langue == "en") { throw new GetValueException(VelerSoftware.SZC.Properties.Resources.Eval_Process_Exited_EN); } else { throw new GetValueException(VelerSoftware.SZC.Properties.Resources.Eval_Process_Exited); } } }
internal void NotifyExited() { if (this.HasExited) { throw new DebuggerException("Already exited"); } process.TraceMessage("Thread " + this.ID + " exited"); if (process.SelectedThread == this) { process.SelectedThread = null; } this.HasExited = true; OnExited(new ThreadEventArgs(this)); process.Threads.Remove(this); }
/// <summary> /// Load symblos for on-disk module /// </summary> public void LoadSymbolsFromDisk(string[] searchPath) { if (!IsDynamic && !IsInMemory) { if (symReader == null) { symReader = metaData.GetSymReader(fullPath, string.Join("; ", searchPath ?? new string[0])); if (symReader != null) { process.TraceMessage("Loaded symbols from disk for " + this.Name); OnSymbolsUpdated(); } } } }
private void EnterCallback(PausedReason pausedReason, string name, ICorDebugProcess pProcess) { isInCallback = true; process.TraceMessage("Callback: " + name); System.Diagnostics.Debug.Assert(process.CorProcess == pProcess); // After break is pressed we may receive some messages that were already queued if (process.IsPaused && process.PauseSession.PausedReason == PausedReason.ForcedBreak) { // TODO: This does not work well if exception if being processed and the user continues it process.TraceMessage("Processing post-break callback"); // This compensates for the break call and we are in normal callback handling mode process.AsyncContinue(DebuggeeStateAction.Keep, new Thread[] { }, null); // Start of call back - create new pause session (as usual) process.NotifyPaused(pausedReason); // Make sure we stay pause after the callback is handled pauseOnNextExit = true; return; } if (process.IsRunning) { process.NotifyPaused(pausedReason); return; } throw new DebuggerException("Invalid state at the start of callback"); }