From c8da081b4bd32cfcb99be673b58f1ca70dea8a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Fri, 28 Apr 2006 21:56:42 +0000 Subject: [PATCH] All debugger values are expired on state change git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1369 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Debugger.Core/Project/Src/Variables/Value.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs index d643f57dc8..69e44af273 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs @@ -19,7 +19,8 @@ namespace Debugger ICorDebugValue corValue; // ICorDebugHandleValue can be used to get corValue back after Continue() protected ICorDebugHandleValue corHandleValue; - object pauseSessionAtCreation; + PauseSession pauseSessionAtCreation; + DebugeeState debugeeStateAtCreation; public event EventHandler ValueChanged; @@ -31,6 +32,8 @@ namespace Debugger internal ICorDebugValue CorValue { get { + if (this.IsExpired) throw new DebuggerException("CorValue has expired"); + if (pauseSessionAtCreation == debugger.PauseSession) { return corValue; } else { @@ -47,6 +50,8 @@ namespace Debugger protected ICorDebugHandleValue SoftReference { get { + if (this.IsExpired) throw new DebuggerException("CorValue has expired"); + if (corHandleValue != null) return corHandleValue; ICorDebugHeapValue2 heapValue = this.CorValue.As(); @@ -66,7 +71,7 @@ namespace Debugger if (corHandleValue == null) { return pauseSessionAtCreation != debugger.PauseSession; } else { - return false; + return debugeeStateAtCreation != debugger.DebugeeState; } } } @@ -139,6 +144,7 @@ namespace Debugger this.corValue = DereferenceUnbox(corValue); } this.pauseSessionAtCreation = debugger.PauseSession; + this.debugeeStateAtCreation = debugger.DebugeeState; } public override string ToString()