diff options
-rw-r--r-- | Mono.Debugging.Soft/VariableValueReference.cs | 23 |
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); |