obstack_free (&m_chunk_obstack, old_top);
}
+/* Dump state of this output_buffer to OUT, for debugging. */
+
+void
+output_buffer::dump (FILE *out) const
+{
+ int depth = 0;
+ for (pp_formatted_chunks *iter = m_cur_formatted_chunks;
+ iter;
+ iter = iter->m_prev, depth++)
+ {
+ fprintf (out, "pp_formatted_chunks: depth %i\n", depth);
+ iter->dump (out);
+ }
+}
+
#ifndef PTRDIFF_MAX
#define PTRDIFF_MAX INTTYPE_MAXIMUM (ptrdiff_t)
#endif
pp_string (this, get_end_url_string (this));
}
+/* Dump state of this pretty_printer to OUT, for debugging. */
+
+void
+pretty_printer::dump (FILE *out) const
+{
+ m_buffer->dump (out);
+}
+
/* class pp_markup::context. */
void
pp_formatted_chunks *push_formatted_chunks ();
void pop_formatted_chunks ();
+ void dump (FILE *out) const;
+ void DEBUG_FUNCTION dump () const { dump (stderr); }
+
/* Obstack where the text is built up. */
struct obstack m_formatted_obstack;
void set_real_maximum_length ();
int remaining_character_count_for_line ();
+ void dump (FILE *out) const;
+ void DEBUG_FUNCTION dump () const { dump (stderr); }
+
private:
/* Where we print external representation of ENTITY. */
output_buffer *m_buffer;