<rdar://problem/11844604>
authorGreg Clayton <gclayton@apple.com>
Mon, 10 Dec 2012 22:26:34 +0000 (22:26 +0000)
committerGreg Clayton <gclayton@apple.com>
Mon, 10 Dec 2012 22:26:34 +0000 (22:26 +0000)
When displaying function.name-with-args format will now print "varname=<unavailable>" instead of omitting argument names and values when there is an error reading the value.

llvm-svn: 169781

lldb/source/Core/Debugger.cpp

index a46bcbf..0159249 100644 (file)
@@ -2269,12 +2269,12 @@ Debugger::FormatPrompt
                                                         ValueObjectSP var_value_sp (ValueObjectVariable::Create (exe_scope, var_sp));
                                                         const char *var_name = var_value_sp->GetName().GetCString();
                                                         const char *var_value = var_value_sp->GetValueAsCString();
+                                                        if (arg_idx > 0)
+                                                            s.PutCString (", ");
                                                         if (var_value_sp->GetError().Success())
-                                                        {
-                                                            if (arg_idx > 0)
-                                                                s.PutCString (", ");
                                                             s.Printf ("%s=%s", var_name, var_value);
-                                                        }
+                                                        else
+                                                            s.Printf ("%s=<unavailable>", var_name);
                                                     }
                                                     
                                                     if (close_paren)