|
|
@ -146,7 +146,12 @@ namespace Debugger |
|
|
|
field.Name, |
|
|
|
field.Name, |
|
|
|
field.IsStatic, |
|
|
|
field.IsStatic, |
|
|
|
field.IsPublic, |
|
|
|
field.IsPublic, |
|
|
|
delegate { |
|
|
|
delegate { return GetValueOfField(field, getter); }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value GetValueOfField(FieldProps field, ValueGetter getter) |
|
|
|
|
|
|
|
{ |
|
|
|
Value updatedVal = getter(); |
|
|
|
Value updatedVal = getter(); |
|
|
|
if (updatedVal is UnavailableValue) return updatedVal; |
|
|
|
if (updatedVal is UnavailableValue) return updatedVal; |
|
|
|
if (this.IsEquivalentValue(updatedVal)) { |
|
|
|
if (this.IsEquivalentValue(updatedVal)) { |
|
|
@ -154,8 +159,6 @@ namespace Debugger |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return new UnavailableValue(debugger, "Object type changed"); |
|
|
|
return new UnavailableValue(debugger, "Object type changed"); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<Variable> GetPropertyVariables(ValueGetter getter) |
|
|
|
public IEnumerable<Variable> GetPropertyVariables(ValueGetter getter) |
|
|
@ -167,24 +170,26 @@ namespace Debugger |
|
|
|
method.Name.Remove(0, 4), |
|
|
|
method.Name.Remove(0, 4), |
|
|
|
method.IsStatic, |
|
|
|
method.IsStatic, |
|
|
|
method.IsPublic, |
|
|
|
method.IsPublic, |
|
|
|
delegate { |
|
|
|
delegate { return CreatePropertyEval(method, getter); }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Eval CreatePropertyEval(MethodProps method, ValueGetter getter) |
|
|
|
|
|
|
|
{ |
|
|
|
Value updatedVal = getter(); |
|
|
|
Value updatedVal = getter(); |
|
|
|
if (updatedVal is UnavailableValue) return null; |
|
|
|
if (updatedVal is UnavailableValue) return null; |
|
|
|
if (this.IsEquivalentValue(updatedVal) && ((ObjectValue)updatedVal).SoftReference != null) { |
|
|
|
if (this.IsEquivalentValue(updatedVal) && ((ObjectValue)updatedVal).SoftReference != null) { |
|
|
|
return CreatePropertyEval(method, getter); |
|
|
|
ICorDebugFunction evalCorFunction = Module.CorModule.GetFunctionFromToken(method.Token); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new Eval(debugger, evalCorFunction, delegate { return GetArgsForEval(method, getter); }); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Eval CreatePropertyEval(MethodProps method, ValueGetter getter) |
|
|
|
ICorDebugValue[] GetArgsForEval(MethodProps method, ValueGetter getter) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ICorDebugFunction evalCorFunction = Module.CorModule.GetFunctionFromToken(method.Token); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new Eval(debugger, evalCorFunction, delegate { |
|
|
|
|
|
|
|
Value updatedVal = getter(); |
|
|
|
Value updatedVal = getter(); |
|
|
|
if (this.IsEquivalentValue(updatedVal) && ((ObjectValue)updatedVal).SoftReference != null) { |
|
|
|
if (this.IsEquivalentValue(updatedVal) && ((ObjectValue)updatedVal).SoftReference != null) { |
|
|
|
if (method.IsStatic) { |
|
|
|
if (method.IsStatic) { |
|
|
@ -195,7 +200,6 @@ namespace Debugger |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public override bool IsEquivalentValue(Value val) |
|
|
|
public override bool IsEquivalentValue(Value val) |
|
|
@ -231,7 +235,14 @@ namespace Debugger |
|
|
|
if (HasBaseClass) { |
|
|
|
if (HasBaseClass) { |
|
|
|
return new Variable(debugger, |
|
|
|
return new Variable(debugger, |
|
|
|
"<Base class>", |
|
|
|
"<Base class>", |
|
|
|
delegate { |
|
|
|
delegate { return GetBaseClassValue(getter); }); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value GetBaseClassValue(ValueGetter getter) |
|
|
|
|
|
|
|
{ |
|
|
|
Value updatedVal = getter(); |
|
|
|
Value updatedVal = getter(); |
|
|
|
if (updatedVal is UnavailableValue) return updatedVal; |
|
|
|
if (updatedVal is UnavailableValue) return updatedVal; |
|
|
|
if (this.IsEquivalentValue(updatedVal)) { |
|
|
|
if (this.IsEquivalentValue(updatedVal)) { |
|
|
@ -239,10 +250,6 @@ namespace Debugger |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return new UnavailableValue(debugger, "Object type changed"); |
|
|
|
return new UnavailableValue(debugger, "Object type changed"); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public unsafe ObjectValue BaseClass { |
|
|
|
public unsafe ObjectValue BaseClass { |
|
|
|