From d9c9da536f0df0efa4dfd95e1797c0edc1950589 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Wed, 20 Jul 2016 03:49:02 +0000 Subject: Add a default-value bool flag pretty_print to the StructuredData Dump methods. They will dump pretty-print (indentation, extra whitepsace) by default. I'll make a change to ProcessGDBRemote soon so it stops sending JSON strings to debugserver pretty-printed; it's unnecessary extra bytes being sent between the two. llvm-svn: 276079 --- lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | 2 +- lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp index 1fdf4c70a5d..b460ab59c99 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -32,7 +32,7 @@ using namespace lldb_private; using namespace lldb; void -StructuredPythonObject::Dump(Stream &s) const +StructuredPythonObject::Dump(Stream &s, bool pretty_print) const { s << "Python Obj: 0x" << GetValue(); } diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 78245a98d0b..fd77a34750f 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -60,7 +60,7 @@ public: return GetValue() && GetValue() != Py_None; } - void Dump(Stream &s) const override; + void Dump(Stream &s, bool pretty_print = true) const override; private: DISALLOW_COPY_AND_ASSIGN(StructuredPythonObject); -- cgit v1.2.3