[Mono.Debugger.Soft] Prettified PrimitivateValue ToString for null values
authorJeffrey Stedfast <jeff@xamarin.com>
Wed, 2 May 2012 20:05:55 +0000 (16:05 -0400)
committerJeffrey Stedfast <jeff@xamarin.com>
Wed, 2 May 2012 20:05:55 +0000 (16:05 -0400)
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs

index 5cf29db9a1aaefaf9b0d252f854724e7386799de..696f6493f4043a726e058dcc41365c9c62290975 100644 (file)
@@ -7,7 +7,6 @@ namespace Mono.Debugger.Soft
         * Represents a value of a primitive type in the debuggee
         */
        public class PrimitiveValue : Value {
-
                object value;
 
                public PrimitiveValue (VirtualMachine vm, object value) : base (vm, 0) {
@@ -33,7 +32,9 @@ namespace Mono.Debugger.Soft
                }
 
                public override string ToString () {
-                       return "PrimitiveValue<" + Value + ">";
+                       object v = Value;
+
+                       return "PrimitiveValue<" + (v != null ? v.ToString () : "(null)") + ">";
                }
 
                public Value InvokeMethod (ThreadMirror thread, MethodMirror method, IList<Value> arguments) {