diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs index 63e6e91867..e3f68385c0 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs @@ -133,12 +133,12 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads using(new PrintTimes("Callstack refresh")) { try { - Utils.DoEvents(debuggedProcess.DebuggeeState); + Utils.DoEvents(debuggedProcess); List items = CreateItems(); UpdateItems(items); } catch(AbortedBecauseDebuggeeResumedException) { } catch(System.Exception) { - if (debuggedProcess == null || debuggedProcess.HasExpired) { + if (debuggedProcess == null || debuggedProcess.HasExited) { // Process unexpectedly exited } else { throw; @@ -170,7 +170,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads item.ForeColor = frame.HasSymbols ? Color.Black : Color.Gray; items.Add(item); - Utils.DoEvents(debuggedProcess.DebuggeeState); + Utils.DoEvents(debuggedProcess); } return items; @@ -193,7 +193,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads callStackList.Items[i].Tag = items[i].Tag; callStackList.Items[i].ForeColor = items[i].ForeColor; - Utils.DoEvents(debuggedProcess.DebuggeeState); + Utils.DoEvents(debuggedProcess); } callStackList.EndUpdate(); } diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/LocalVarPad.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/LocalVarPad.cs index cf46282af2..7f7af5b6c5 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/LocalVarPad.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/LocalVarPad.cs @@ -234,11 +234,11 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads using(new PrintTimes("Local Variables refresh")) { try { localVarList.BeginUpdate(); - Utils.DoEvents(debuggedProcess.DebuggeeState); + Utils.DoEvents(debuggedProcess); TreeViewVarNode.SetContentRecursive(debuggedProcess, LocalVarList, new StackFrameNode(debuggedProcess.SelectedStackFrame).ChildNodes); } catch(AbortedBecauseDebuggeeResumedException) { } catch(System.Exception) { - if (debuggedProcess == null || debuggedProcess.HasExpired) { + if (debuggedProcess == null || debuggedProcess.HasExited) { // Process unexpectedly exited } else { throw; diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/RunningThreadsPad.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/RunningThreadsPad.cs index 4d7d1f39fd..e0a9a39920 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/RunningThreadsPad.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/RunningThreadsPad.cs @@ -130,13 +130,13 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads try { foreach (Thread t in debuggedProcess.Threads) { if (debuggedProcess.IsPaused) { - Utils.DoEvents(debuggedProcess.DebuggeeState); + Utils.DoEvents(debuggedProcess); } RefreshThread(t); } } catch(AbortedBecauseDebuggeeResumedException) { } catch(System.Exception) { - if (debuggedProcess == null || debuggedProcess.HasExpired) { + if (debuggedProcess == null || debuggedProcess.HasExited) { // Process unexpectedly exited } else { throw; diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs index c4a5c35e71..bf883bdaac 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs @@ -510,7 +510,7 @@ namespace ICSharpCode.SharpDevelop.Services if (currentTooltipRow != null && currentTooltipRow.IsShown) { using(new PrintTimes("Update tooltip")) { try { - Utils.DoEvents(debuggedProcess.DebuggeeState); + Utils.DoEvents(debuggedProcess); AbstractNode updatedNode = ValueNode.Create(currentTooltipExpression); currentTooltipRow.SetContentRecursive(updatedNode); } catch (AbortedBecauseDebuggeeResumedException) { @@ -555,7 +555,7 @@ namespace ICSharpCode.SharpDevelop.Services DebuggerEventForm.Result result = DebuggerEventForm.Show(title, message, icon, canContinue); // If the process was killed while the exception form was shown - if (e.Process.HasExpired) return; + if (e.Process.HasExited) return; switch (result) { case DebuggerEventForm.Result.Break: diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Adapters/DynamicTreeDebuggerRow.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Adapters/DynamicTreeDebuggerRow.cs index aa225f17af..bb2b2c4519 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Adapters/DynamicTreeDebuggerRow.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Adapters/DynamicTreeDebuggerRow.cs @@ -83,7 +83,7 @@ namespace Debugger.AddIn.TreeModel } // Repaint and process user commands - Utils.DoEvents(process.DebuggeeState); + Utils.DoEvents(process); } public void SetChildContentRecursive(IEnumerable contentEnum) diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Adapters/TreeViewVarNode.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Adapters/TreeViewVarNode.cs index 478bde23ca..a40d097413 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Adapters/TreeViewVarNode.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Adapters/TreeViewVarNode.cs @@ -87,13 +87,13 @@ namespace Debugger.AddIn.TreeModel this.Collapse(); } // Process user commands - Utils.DoEvents(process.DebuggeeState); + Utils.DoEvents(process); // Repaint if (HighPrecisionTimer.Now > nextRepaintTime) { using(new PrintTime("Repainting Local Variables Pad")) { try { this.Tree.EndUpdate(); // Enable painting - Utils.DoEvents(process.DebuggeeState); // Paint + Utils.DoEvents(process); // Paint } finally { this.Tree.BeginUpdate(); // Disable painting nextRepaintTime = HighPrecisionTimer.Now + workTime; diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Utils.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Utils.cs index 0f7e580e96..f462673927 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Utils.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Utils.cs @@ -17,19 +17,16 @@ namespace Debugger.AddIn.TreeModel { public static partial class Utils { - public static void DoEvents(DebuggeeState debuggeeState) + /// Process on which to track debuggee state + public static void DoEvents(Process process) { - if (debuggeeState == null) { - throw new ArgumentNullException(); - } - if (debuggeeState.HasExpired) { - throw new System.Exception("State is expired before DoEvents"); - } + DebuggeeState oldState = process.DebuggeeState; //using(new PrintTimes("Application.DoEvents()")) { Application.DoEvents(); } - if (debuggeeState.HasExpired) { + DebuggeeState newState = process.DebuggeeState; + if (oldState != newState) { LoggingService.Info("Aborted because debuggee resumed"); throw new AbortedBecauseDebuggeeResumedException(); } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj index ca9150ac90..c905f324f5 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj @@ -60,7 +60,6 @@ - diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process-StateControl.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process-StateControl.cs index b3c0a780ca..561274dc2a 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process-StateControl.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process-StateControl.cs @@ -83,7 +83,7 @@ namespace Debugger internal void NotifyPaused(PausedReason pauseReason) { AssertRunning(); - pauseSession = new PauseSession(pauseReason); + pauseSession = new PauseSession(this, pauseReason); if (debuggeeState == null) { debuggeeState = new DebuggeeState(this); } @@ -93,14 +93,10 @@ namespace Debugger internal void NotifyResumed(DebuggeeStateAction action) { AssertPaused(); - PauseSession oldPauseSession = pauseSession; pauseSession = null; - oldPauseSession.NotifyHasExpired(); if (action == DebuggeeStateAction.Clear) { if (debuggeeState == null) throw new DebuggerException("Debugee state already cleared"); - DebuggeeState oldDebugeeState = debuggeeState; debuggeeState = null; - oldDebugeeState.NotifyHasExpired(); } } @@ -116,7 +112,7 @@ namespace Debugger // The event could have resumed or killed the process } - if (this.IsPaused && !this.HasExpired) { + if (this.IsPaused && !this.HasExited) { OnPaused(); // The event could have resumed the process } @@ -192,7 +188,7 @@ namespace Debugger NotifyPaused(PausedReason.ForcedBreak); } corProcess.Detach(); - NotifyHasExpired(); + NotifyHasExited(); } #region Convenience methods @@ -288,24 +284,24 @@ namespace Debugger /// public void WaitForPause() { - while(this.IsRunning && !this.HasExpired) { + while(this.IsRunning && !this.HasExited) { debugger.MTA2STA.WaitForCall(); debugger.MTA2STA.PerformAllCalls(); } - if (this.HasExpired) throw new ProcessExitedException(); + if (this.HasExited) throw new ProcessExitedException(); } public void WaitForPause(TimeSpan timeout) { DateTime endTime = Util.HighPrecisionTimer.Now + timeout; - while(this.IsRunning && !this.HasExpired) { + while(this.IsRunning && !this.HasExited) { TimeSpan timeLeft = endTime - Util.HighPrecisionTimer.Now; if (timeLeft <= TimeSpan.FromMilliseconds(10)) break; //this.TraceMessage("Time left: " + timeLeft.TotalMilliseconds); debugger.MTA2STA.WaitForCall(timeLeft); debugger.MTA2STA.PerformCall(); } - if (this.HasExpired) throw new ProcessExitedException(); + if (this.HasExited) throw new ProcessExitedException(); } /// @@ -313,7 +309,7 @@ namespace Debugger /// public void WaitForExit() { - while(!this.HasExpired) { + while(!this.HasExited) { debugger.MTA2STA.WaitForCall(); debugger.MTA2STA.PerformAllCalls(); } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process.cs index 89cdeaf6e1..da10cc2df2 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process.cs @@ -12,7 +12,7 @@ using Debugger.Wrappers.CorDebug; namespace Debugger { - public partial class Process: DebuggerObject, IExpirable + public partial class Process: DebuggerObject { NDebugger debugger; @@ -21,22 +21,22 @@ namespace Debugger #region IExpirable - bool hasExpired = false; + bool hasExited = false; - public event EventHandler Expired; + public event EventHandler Exited; - public bool HasExpired { + public bool HasExited { get { - return hasExpired; + return hasExited; } } - internal void NotifyHasExpired() + internal void NotifyHasExited() { - if(!hasExpired) { - hasExpired = true; - if (Expired != null) { - Expired(this, new ProcessEventArgs(this)); + if(!hasExited) { + hasExited = true; + if (Exited != null) { + Exited(this, new ProcessEventArgs(this)); } // Expire pause seesion first if (IsPaused) { diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/StackFrame.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/StackFrame.cs index 36f63d8df6..aee357adb1 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/StackFrame.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/StackFrame.cs @@ -70,8 +70,9 @@ namespace Debugger } } - /// True if stack frame stepped out and is not longer valid. - public bool HasExpired { + /// Returns true is this incance can not be used any more. + /// Stack frame is valid only until the debugee is resumed. + public bool IsInvalid { get { return this.corILFramePauseSession != process.PauseSession; } @@ -102,7 +103,7 @@ namespace Debugger internal ICorDebugILFrame CorILFrame { get { - if (HasExpired) throw new DebuggerException("StackFrame has expired"); + if (this.IsInvalid) throw new DebuggerException("StackFrame is not valid anymore"); return corILFrame; } } @@ -251,7 +252,6 @@ namespace Debugger ICorDebugValue GetThisCorValue() { if (this.MethodInfo.IsStatic) throw new GetValueException("Static method does not have 'this'."); - if (this.HasExpired) throw new GetValueException("StackFrame has expired"); try { return CorILFrame.GetArgument(0); } catch (COMException e) { @@ -282,8 +282,6 @@ namespace Debugger ICorDebugValue GetArgumentCorValue(int index) { - if (this.HasExpired) throw new GetValueException("StackFrame has expired"); - try { // Non-static methods include 'this' as first argument return CorILFrame.GetArgument((uint)(this.MethodInfo.IsStatic? index : (index + 1))); @@ -326,8 +324,6 @@ namespace Debugger ICorDebugValue GetLocalVariableCorValue(ISymUnmanagedVariable symVar) { - if (this.HasExpired) throw new GetValueException("StackFrame has expired"); - try { return CorILFrame.GetLocalVariable((uint)symVar.AddressField1); } catch (COMException e) { diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Thread.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Thread.cs index fd7f835298..eb838b0666 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Thread.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Thread.cs @@ -320,7 +320,7 @@ namespace Debugger public StackFrame SelectedStackFrame { get { - if (selectedStackFrame != null && selectedStackFrame.HasExpired) return null; + if (selectedStackFrame != null && selectedStackFrame.IsInvalid) return null; if (process.IsRunning) return null; return selectedStackFrame; } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/DebuggeeState.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/DebuggeeState.cs index b421afac92..e5cf410b2f 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/DebuggeeState.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/DebuggeeState.cs @@ -10,15 +10,17 @@ using System; namespace Debugger { /// - /// Unique identifier of the state of the debugee. - /// Changes when debuggee is stepped, but not when properity is evaluated. + /// Represents span of time in which the debugger state is assumed to + /// be unchanged. /// - public class DebuggeeState: IExpirable + /// + /// For example, althogh property evaluation can in theory change + /// any memory, it is assumed that they behave 'corectly' and thus + /// property evaluation does not change debugger state. + /// + public class DebuggeeState: DebuggerObject { Process process; - bool hasExpired = false; - - public event EventHandler Expired; [Debugger.Tests.Ignore] public Process Process { @@ -27,22 +29,6 @@ namespace Debugger } } - public bool HasExpired { - get { - return hasExpired; - } - } - - internal void NotifyHasExpired() - { - if(!hasExpired) { - hasExpired = true; - if (Expired != null) { - Expired(this, EventArgs.Empty); - } - } - } - public DebuggeeState(Process process) { this.process = process; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/IExpirable.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/IExpirable.cs deleted file mode 100644 index 567b16358c..0000000000 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/IExpirable.cs +++ /dev/null @@ -1,18 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; - -namespace Debugger -{ - public interface IExpirable - { - event EventHandler Expired; - - bool HasExpired { get ; } - } -} diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/PauseSession.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/PauseSession.cs index 6e4348e19f..58c412d037 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/PauseSession.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/PauseSession.cs @@ -13,38 +13,22 @@ namespace Debugger /// Holds information about the state of paused debugger. /// Expires when when Continue is called on debugger. /// - public class PauseSession: IExpirable + public class PauseSession: DebuggerObject { + Process process; PausedReason pausedReason; - bool hasExpired = false; - - public event EventHandler Expired; - - public bool HasExpired { - get { - return hasExpired; - } - } - - internal void NotifyHasExpired() - { - if(!hasExpired) { - hasExpired = true; - if (Expired != null) { - Expired(this, EventArgs.Empty); - } - } + public Process Process { + get { return process; } } public PausedReason PausedReason { - get { - return pausedReason; - } + get { return pausedReason; } } - public PauseSession(PausedReason pausedReason) + public PauseSession(Process process, PausedReason pausedReason) { + this.process = process; this.pausedReason = pausedReason; } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Expressions/Expression.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Expressions/Expression.cs index 1c248c8d4b..bc69452704 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Expressions/Expression.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Expressions/Expression.cs @@ -56,7 +56,7 @@ namespace Debugger.Expressions } if (expressionCache.ContainsKey(this)) { Value cachedResult = expressionCache[this]; - if (!cachedResult.HasExpired) { + if (!cachedResult.IsInvalid) { return cachedResult; } } @@ -66,7 +66,7 @@ namespace Debugger.Expressions public Value Evaluate(StackFrame context) { if (context == null) throw new ArgumentNullException("context"); - if (context.HasExpired) throw new DebuggerException("Context is expired StackFrame"); + if (context.IsInvalid) throw new DebuggerException("The context is no longer valid"); Value result; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs index 14bd68e569..459609030d 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs @@ -407,7 +407,7 @@ namespace Debugger // ExitProcess may be called at any time when debuggee is killed process.TraceMessage("Callback: ExitProcess"); - process.NotifyHasExpired(); + process.NotifyHasExited(); } #endregion diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallbackSwitch.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallbackSwitch.cs index f808f0dcf6..47401fda8a 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallbackSwitch.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallbackSwitch.cs @@ -55,7 +55,7 @@ namespace Debugger public ManagedCallback GetProcessCallbackInterface(ICorDebugProcess pProcess) { Process process = debugger.GetProcess(pProcess); - if (process == null || process.HasExpired) { + if (process == null || process.HasExited) { debugger.TraceMessage("Ignoring callback of exited process (process not found)"); return null; } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs index 09db598395..2975816c29 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs @@ -386,7 +386,7 @@ namespace Debugger.MetaData type.LoadMemberInfo(); } typesWithMatchingName.Add(type); - type.Process.Expired += delegate { typesWithMatchingName.Remove(type); }; + type.Process.Exited += delegate { typesWithMatchingName.Remove(type); }; TimeSpan totalTime2 = Util.HighPrecisionTimer.Now - startTime; string prefix = type.IsInterface ? "interface" : "type"; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.cs index a82fbc4db8..ad6eeb4aa7 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.cs @@ -61,9 +61,9 @@ namespace Debugger } } - /// Returns true if the Value has expired - /// and can not be used anymore - public bool HasExpired { + /// Returns true if the Value can not be used anymore. + /// Value is valid only until the debuggee is resummed. + public bool IsInvalid { get { return rawCorValue_pauseSession != process.PauseSession && !rawCorValue.Is(); @@ -72,7 +72,7 @@ namespace Debugger internal ICorDebugValue RawCorValue { get { - if (this.HasExpired) throw new GetValueException("Value has expired"); + if (this.IsInvalid) throw new GetValueException("Value is no longer valid"); return rawCorValue; } @@ -80,7 +80,7 @@ namespace Debugger internal ICorDebugValue CorValue { get { - if (this.HasExpired) throw new GetValueException("Value has expired"); + if (this.IsInvalid) throw new GetValueException("Value is no longer valid"); if (corValue_pauseSession != process.PauseSession) { corValue = DereferenceUnbox(rawCorValue); diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs index 3277db7897..6b34d90027 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs @@ -73,7 +73,7 @@ namespace Debugger.Tests protected void EndTest() { - if (!process.HasExpired) { + if (!process.HasExited) { process.AsyncContinue(); process.WaitForExit(); } @@ -156,7 +156,7 @@ namespace Debugger.Tests process.ExceptionThrown += delegate(object sender, ExceptionEventArgs e) { LogEvent("ExceptionThrown", e.Exception.Message); }; - process.Expired += delegate(object sender, EventArgs e) { + process.Exited += delegate(object sender, EventArgs e) { LogEvent("ProcessExited", null); }; diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs index 24ff761d35..92cd777241 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs @@ -62,9 +62,9 @@ namespace Debugger.Tests { ArrayRank="1" AsString="{System.Int32[]}" Expression="array" - HasExpired="False" IsArray="True" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="False" @@ -79,9 +79,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="0" Expression="array[0]" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -95,9 +95,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="1" Expression="array[1]" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -111,9 +111,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="2" Expression="array[2]" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -127,9 +127,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="3" Expression="array[3]" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -143,9 +143,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="4" Expression="array[4]" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -212,9 +212,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="5" Expression="array.Length" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs index 54f083c7b6..9c21947e8e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs @@ -63,8 +63,8 @@ namespace Debugger.Tests { @@ -72,8 +72,8 @@ namespace Debugger.Tests { @@ -81,8 +81,8 @@ namespace Debugger.Tests { @@ -93,8 +93,8 @@ namespace Debugger.Tests { @@ -102,8 +102,8 @@ namespace Debugger.Tests { @@ -114,8 +114,8 @@ namespace Debugger.Tests { diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs index bd0dc861ed..2567abd8a6 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs @@ -102,9 +102,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="1" Expression="i" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -118,9 +118,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="A" Expression="s" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -134,9 +134,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="null" Expression="s_null" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="True" IsObject="False" IsPrimitive="False" @@ -150,9 +150,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="2" Expression="ref_i" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -166,9 +166,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="3" Expression="out_i" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -182,9 +182,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="0" Expression="out_i2" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -198,9 +198,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="B" Expression="ref_s" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -214,9 +214,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="{System.Nullable<System.Int32>}" Expression="iNull" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="True" IsPrimitive="False" @@ -230,9 +230,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="{System.Nullable<System.Int32>}" Expression="iNull_null" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="True" IsPrimitive="False" @@ -249,9 +249,9 @@ namespace Debugger.Tests { ArrayRank="1" AsString="{System.String[]}" Expression="args" - HasExpired="False" IsArray="True" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="False" @@ -268,9 +268,9 @@ namespace Debugger.Tests { ArrayRank="1" AsString="{System.String[]}" Expression="args" - HasExpired="False" IsArray="True" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="False" @@ -287,9 +287,9 @@ namespace Debugger.Tests { ArrayRank="1" AsString="{System.String[]}" Expression="args" - HasExpired="False" IsArray="True" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="False" @@ -306,9 +306,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="1" Expression="i" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -322,9 +322,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="A" Expression="s" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs index 9c7ada1b1d..120762e783 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs @@ -75,46 +75,46 @@ namespace Debugger.Tests { Break + NextStatement="{Exception: StackFrame is not valid anymore}" /> Break + NextStatement="{Exception: StackFrame is not valid anymore}" /> @@ -123,26 +123,26 @@ namespace Debugger.Tests { + NextStatement="{Exception: StackFrame is not valid anymore}" /> diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs index 14685fe6a4..37b49173bb 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs @@ -57,9 +57,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="0" Expression="i" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -73,9 +73,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="S" Expression="s" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -89,9 +89,9 @@ namespace Debugger.Tests { ArrayRank="1" AsString="{System.String[]}" Expression="args" - HasExpired="False" IsArray="True" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="False" @@ -105,9 +105,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="null" Expression="n" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="True" IsObject="False" IsPrimitive="False" @@ -121,9 +121,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="{System.Object}" Expression="o" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="True" IsPrimitive="False" diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs index 2ae71336f5..cd98e5b1ad 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs @@ -106,9 +106,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="1" Expression="argument" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -122,9 +122,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="2" Expression="local" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -138,9 +138,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="3" Expression="this.class" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -150,50 +150,50 @@ namespace Debugger.Tests { Break <_x0040_class> @@ -203,9 +203,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="4" Expression="localInSubFunction" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -215,131 +215,131 @@ namespace Debugger.Tests { Break <_x0040_class> Break <_x0040_class> @@ -349,9 +349,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="4" Expression="localInSubFunction" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -361,66 +361,66 @@ namespace Debugger.Tests { Break <_x0040_class> diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs index d66f5d3409..9f05fb8305 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs @@ -136,8 +136,8 @@ namespace Debugger.Tests { @@ -178,9 +178,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="1" Expression="v" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -194,9 +194,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="1!" Expression="k" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -209,8 +209,8 @@ namespace Debugger.Tests { @@ -251,9 +251,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="2" Expression="v" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -267,9 +267,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="2!" Expression="k" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -282,8 +282,8 @@ namespace Debugger.Tests { @@ -324,9 +324,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="3" Expression="v" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -340,9 +340,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="3!" Expression="k" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -355,8 +355,8 @@ namespace Debugger.Tests { @@ -397,9 +397,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="4" Expression="v" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -413,9 +413,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="4!" Expression="k" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -428,8 +428,8 @@ namespace Debugger.Tests { @@ -470,9 +470,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="5" Expression="v" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -486,9 +486,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="5!" Expression="k" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -501,8 +501,8 @@ namespace Debugger.Tests { @@ -543,9 +543,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="6" Expression="v" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -559,9 +559,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="6!" Expression="k" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -574,8 +574,8 @@ namespace Debugger.Tests { @@ -616,9 +616,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="7" Expression="v" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -632,9 +632,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="7!" Expression="k" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -647,8 +647,8 @@ namespace Debugger.Tests { @@ -689,9 +689,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="8" Expression="v" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -705,9 +705,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="8!" Expression="k" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -723,9 +723,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="0" Expression="gClass.Prop" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -739,9 +739,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="0" Expression="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>.StaticProp" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs index b612a874b3..3127095082 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs @@ -64,9 +64,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="True" Expression="b" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -116,9 +116,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="5" Expression="i" - HasExpired="False" IsArray="False" IsInteger="True" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -168,9 +168,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="five" Expression="s" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" @@ -220,9 +220,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="5.5" Expression="d" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="False" IsPrimitive="True" diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackOverflow.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackOverflow.cs index 0521f7376e..48430622dd 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackOverflow.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackOverflow.cs @@ -57,8 +57,8 @@ namespace Debugger.Tests { diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs index 34c496d923..183bfe51ff 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs @@ -60,9 +60,9 @@ namespace Debugger.Tests { ArrayRank="{Exception: Value is not an array}" AsString="{Debugger.Tests.ValueType}" Expression="this" - HasExpired="False" IsArray="False" IsInteger="False" + IsInvalid="False" IsNull="False" IsObject="True" IsPrimitive="False"