This has saved me a lot of typing in the debugger.
gcc/ChangeLog:
* json.cc (value::dump): New overload, taking no params.
* json.h (value::dump): New decl.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
pp_flush (&pp);
}
+/* A convenience function for debugging.
+ Dump to stderr with formatting, and a trailing newline. */
+
+void
+value::dump () const
+{
+ dump (stderr, true);
+ fprintf (stderr, "\n");
+}
+
/* class json::object, a subclass of json::value, representing
an ordered collection of key/value pairs. */
virtual void print (pretty_printer *pp, bool formatted) const = 0;
void dump (FILE *, bool formatted) const;
+ void DEBUG_FUNCTION dump () const;
};
/* Subclass of value for objects: a collection of key/value pairs