Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/debugger-libs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <jestedfa@microsoft.com>2020-04-02 18:54:28 +0300
committerJeffrey Stedfast <jestedfa@microsoft.com>2020-04-02 18:58:09 +0300
commitd1873d7b36838805852a1339a96c026ac4c83880 (patch)
treebdbc5d107e88d3c5af7549596a1723c6560dd434 /Mono.Debugging.Soft
parent71a6a8cab22d712596e96576cbd3864689e64382 (diff)
Fixed VariableValueReference.GetValue() to use the cached value if it has it
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1088095
Diffstat (limited to 'Mono.Debugging.Soft')
-rw-r--r--Mono.Debugging.Soft/VariableValueReference.cs23
1 files changed, 9 insertions, 14 deletions
diff --git a/Mono.Debugging.Soft/VariableValueReference.cs b/Mono.Debugging.Soft/VariableValueReference.cs
index dd26753..1370dad 100644
--- a/Mono.Debugging.Soft/VariableValueReference.cs
+++ b/Mono.Debugging.Soft/VariableValueReference.cs
@@ -89,10 +89,11 @@ namespace Mono.Debugging.Soft
return ctx.Adapter.IsNull (ctx, value) ? null : value;
}
- public override object GetValue (EvaluationContext ctx)
+ object GetValue (SoftEvaluationContext ctx)
{
try {
- value = ((SoftEvaluationContext) ctx).Frame.GetValue (variable);
+ if (value == null)
+ value = batch != null ? batch.GetValue (variable) : ctx.Frame.GetValue (variable);
return NormalizeValue (ctx, value);
} catch (AbsentInformationException ex) {
@@ -102,20 +103,14 @@ namespace Mono.Debugging.Soft
}
}
+ public override object GetValue (EvaluationContext ctx)
+ {
+ return GetValue ((SoftEvaluationContext) Context);
+ }
+
public override object Value {
get {
- var ctx = (SoftEvaluationContext) Context;
-
- try {
- if (value == null)
- value = batch != null ? batch.GetValue (variable) : ctx.Frame.GetValue (variable);
-
- return NormalizeValue (ctx, value);
- } catch (AbsentInformationException ex) {
- throw new EvaluatorException (ex, "Value not available");
- } catch (Exception ex) {
- throw new EvaluatorException (ex.Message);
- }
+ return GetValue ((SoftEvaluationContext) Context);
}
set {
((SoftEvaluationContext) Context).Frame.SetValue (variable, (Value) value);