Browse Source

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
shortcuts
David Srbecký 20 years ago
parent
commit
c8da081b4b
  1. 10
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs

10
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs

@ -19,7 +19,8 @@ namespace Debugger
ICorDebugValue corValue; ICorDebugValue corValue;
// ICorDebugHandleValue can be used to get corValue back after Continue() // ICorDebugHandleValue can be used to get corValue back after Continue()
protected ICorDebugHandleValue corHandleValue; protected ICorDebugHandleValue corHandleValue;
object pauseSessionAtCreation; PauseSession pauseSessionAtCreation;
DebugeeState debugeeStateAtCreation;
public event EventHandler<ValueEventArgs> ValueChanged; public event EventHandler<ValueEventArgs> ValueChanged;
@ -31,6 +32,8 @@ namespace Debugger
internal ICorDebugValue CorValue { internal ICorDebugValue CorValue {
get { get {
if (this.IsExpired) throw new DebuggerException("CorValue has expired");
if (pauseSessionAtCreation == debugger.PauseSession) { if (pauseSessionAtCreation == debugger.PauseSession) {
return corValue; return corValue;
} else { } else {
@ -47,6 +50,8 @@ namespace Debugger
protected ICorDebugHandleValue SoftReference { protected ICorDebugHandleValue SoftReference {
get { get {
if (this.IsExpired) throw new DebuggerException("CorValue has expired");
if (corHandleValue != null) return corHandleValue; if (corHandleValue != null) return corHandleValue;
ICorDebugHeapValue2 heapValue = this.CorValue.As<ICorDebugHeapValue2>(); ICorDebugHeapValue2 heapValue = this.CorValue.As<ICorDebugHeapValue2>();
@ -66,7 +71,7 @@ namespace Debugger
if (corHandleValue == null) { if (corHandleValue == null) {
return pauseSessionAtCreation != debugger.PauseSession; return pauseSessionAtCreation != debugger.PauseSession;
} else { } else {
return false; return debugeeStateAtCreation != debugger.DebugeeState;
} }
} }
} }
@ -139,6 +144,7 @@ namespace Debugger
this.corValue = DereferenceUnbox(corValue); this.corValue = DereferenceUnbox(corValue);
} }
this.pauseSessionAtCreation = debugger.PauseSession; this.pauseSessionAtCreation = debugger.PauseSession;
this.debugeeStateAtCreation = debugger.DebugeeState;
} }
public override string ToString() public override string ToString()

Loading…
Cancel
Save