Browse Source

Implemented evaluation of properties on value types

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1305 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
c96aaf39bb
  1. 12
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs

12
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs

@ -171,7 +171,7 @@ namespace Debugger @@ -171,7 +171,7 @@ namespace Debugger
if (updatedVal is UnavailableValue) {
return null;
}
if (this.IsEquivalentValue(updatedVal) && ((ObjectValue)updatedVal).SoftReference != null) {
if (this.IsEquivalentValue(updatedVal)) {
ICorDebugFunction evalCorFunction = Module.CorModule.GetFunctionFromToken(method.Token);
return new Eval(debugger, evalCorFunction, delegate { return GetArgsForEval(method, getter); });
@ -182,12 +182,16 @@ namespace Debugger @@ -182,12 +182,16 @@ namespace Debugger
ICorDebugValue[] GetArgsForEval(MethodProps method, ValueGetter getter)
{
Value updatedVal = getter();
if (this.IsEquivalentValue(updatedVal) && ((ObjectValue)updatedVal).SoftReference != null) {
ObjectValue updatedVal = (ObjectValue)getter();
if (this.IsEquivalentValue(updatedVal)) {
if (method.IsStatic) {
return new ICorDebugValue[] {};
} else {
return new ICorDebugValue[] {((ObjectValue)updatedVal).SoftReference.CastTo<ICorDebugValue>()};
if (updatedVal.SoftReference != null) {
return new ICorDebugValue[] {updatedVal.SoftReference.CastTo<ICorDebugValue>()};
} else {
return new ICorDebugValue[] {updatedVal.CorValue};
}
}
} else {
return null;

Loading…
Cancel
Save