diff options
-rw-r--r-- | main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs index 5291d57b7c..a980486a4a 100644 --- a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs +++ b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs @@ -928,10 +928,20 @@ namespace Mono.Debugging.Evaluation string mem = exp.Substring (i, j - i).Trim (); if (mem.Length == 0) return exp; - - ValueReference member = GetMember (ctx, null, GetValueType (ctx, obj), obj, mem); + + string[] props = mem.Split (new char[] { '.' }); + ValueReference member = null; + object val = obj; + + for (int k = 0; k < props.Length; k++) { + member = GetMember (ctx, null, GetValueType (ctx, val), val, props[k]); + if (member == null) + break; + + val = member.Value; + } + if (member != null) { - object val = member.Value; sb.Append (ctx.Evaluator.TargetObjectToString (ctx, val)); } else { sb.Append ("{Unknown member '" + mem + "'}"); |