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 @@ -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<ValueEventArgs> ValueChanged;
@ -31,6 +32,8 @@ namespace Debugger @@ -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 @@ -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<ICorDebugHeapValue2>();
@ -66,7 +71,7 @@ namespace Debugger @@ -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 @@ -139,6 +144,7 @@ namespace Debugger
this.corValue = DereferenceUnbox(corValue);
}
this.pauseSessionAtCreation = debugger.PauseSession;
this.debugeeStateAtCreation = debugger.DebugeeState;
}
public override string ToString()

Loading…
Cancel
Save