Commit 4a1e7a0e authored by benl's avatar benl

Document flags to suppress unwanted info in core dumps.

parent d08789a5
......@@ -476,6 +476,88 @@
style.</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="formatting dumps">
<title>Formatting dumps</title>
<indexterm><primary>formatting dumps</primary></indexterm>
<variablelist>
<varlistentry>
<term>
<option>-dppr-user-length</option>
<indexterm><primary><option>-dppr-user-length</option></primary></indexterm>
</term>
<listitem>
<para>In error messages, expressions are printed to a
certain &ldquo;depth&rdquo;, with subexpressions beyond the
depth replaced by ellipses. This flag sets the
depth. Its default value is 5.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-dppr-colsNNN</option>
<indexterm><primary><option>-dppr-colsNNN</option></primary></indexterm>
</term>
<listitem>
<para>Set the width of debugging output. Use this if your code is wrapping too much.
For example: <option>-dppr-cols200</option>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-dppr-case-as-let</option>
<indexterm><primary><option>-dppr-case-as-let</option></primary></indexterm>
</term>
<listitem>
<para>Print single alternative case expressions as though they were strict
let expressions. This is helpful when your code does a lot of unboxing.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-dno-debug-output</option>
<indexterm><primary><option>-dno-debug-output</option></primary></indexterm>
</term>
<listitem>
<para>Suppress any unsolicited debugging output. When GHC
has been built with the <literal>DEBUG</literal> option it
occasionally emits debug output of interest to developers.
The extra output can confuse the testing framework and
cause bogus test failures, so this flag is provided to
turn it off.</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="supression">
<title>Suppressing unwanted information</title>
<indexterm><primary>suppression</primary></indexterm>
Core dumps contain a large amount of information. Depending on what you are doing, not all of it will be useful.
Use these flags to suppress the parts that you are not interested in.
<variablelist>
<varlistentry>
<term>
<option>-dsuppress-all</option>
<indexterm><primary><option>-dsuppress-all</option></primary></indexterm>
</term>
<listitem>
<para>Suppress everything that can be suppressed, except for unique ids as this often
makes the printout ambiguous. If you just want to see the overall structure of
the code, then start here.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
......@@ -483,7 +565,7 @@
<indexterm><primary><option>-dsuppress-uniques</option></primary></indexterm>
</term>
<listitem>
<para>Suppress the printing of uniques in debugging output. This may make
<para>Suppress the printing of uniques. This may make
the printout ambiguous (e.g. unclear where an occurrence of 'x' is bound), but
it makes the output of two compiler runs have many fewer gratuitous differences,
so you can realistically apply <command>diff</command>. Once <command>diff</command>
......@@ -493,12 +575,13 @@
<varlistentry>
<term>
<option>-dsuppress-coercions</option>
<indexterm><primary><option>-dsuppress-coercions</option></primary></indexterm>
<option>-dsuppress-idinfo</option>
<indexterm><primary><option>-dsuppress-idinfo</option></primary></indexterm>
</term>
<listitem>
<para>Suppress the printing of coercions in Core dumps to make them
shorter.</para>
<para>Suppress extended information about identifiers where they are bound. This includes
strictness information and inliner templates. Using this flag can cut the size
of the core dump in half, due to the lack of inliner templates</para>
</listitem>
</varlistentry>
......@@ -508,36 +591,39 @@ shorter.</para>
<indexterm><primary><option>-dsuppress-module-prefixes</option></primary></indexterm>
</term>
<listitem>
<para>Suppress the printing of module qualification prefixes in Core dumps to make them easier to read.</para>
<para>Suppress the printing of module qualification prefixes.
This is the <constant>Data.List</constant> in <constant>Data.List.length</constant>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-dppr-user-length</option>
<indexterm><primary><option>-dppr-user-length</option></primary></indexterm>
<option>-dsuppress-type-signatures</option>
<indexterm><primary><option>-dsuppress-type-signatures</option></primary></indexterm>
</term>
<listitem>
<para>In error messages, expressions are printed to a
certain &ldquo;depth&rdquo;, with subexpressions beyond the
depth replaced by ellipses. This flag sets the
depth. Its default value is 5.</para>
<para>Suppress the printing of type signatures.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-dno-debug-output</option>
<indexterm><primary><option>-dno-debug-output</option></primary></indexterm>
<term>
<option>-dsuppress-type-applications</option>
<indexterm><primary><option>-dsuppress-type-applications</option></primary></indexterm>
</term>
<listitem>
<para>Suppress any unsolicited debugging output. When GHC
has been built with the <literal>DEBUG</literal> option it
occasionally emits debug output of interest to developers.
The extra output can confuse the testing framework and
cause bogus test failures, so this flag is provided to
turn it off.</para>
</listitem>
<listitem>
<para>Suppress the printing of type applications.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-dsuppress-coercions</option>
<indexterm><primary><option>-dsuppress-coercions</option></primary></indexterm>
</term>
<listitem>
<para>Suppress the printing of type coercions.</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
......
......@@ -2460,33 +2460,69 @@ phase <replaceable>n</replaceable></entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dppr-noprags</option></entry>
<entry>Don't output pragma info in dumps</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dppr-user-length</option></entry>
<entry>Set the depth for printing expressions in error msgs</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dppr-colsNNN</option></entry>
<entry>Set the width of debugging output. For example <option>-dppr-cols200</option></entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dppr-case-as-let</option></entry>
<entry>Print single alternative case expressions as strict lets.</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dsuppress-all</option></entry>
<entry>In core dumps, suppress everything that is suppressable.</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dsuppress-uniques</option></entry>
<entry>Suppress the printing of uniques in debug output (easier to use <command>diff</command>.</entry>
<entry>Suppress the printing of uniques in debug output (easier to use <command>diff</command>)</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dsuppress-coercions</option></entry>
<entry>Suppress the printing of coercions in Core dumps to make them shorter.</entry>
<entry><option>-dsuppress-idinfo</option></entry>
<entry>Suppress extended information about identifiers where they are bound</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dsuppress-module-prefixes</option></entry>
<entry>Suppress the printing of module qualification prefixes in Core dumps to make them easier to read.</entry>
<entry>Suppress the printing of module qualification prefixes</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dppr-noprags</option></entry>
<entry>Don't output pragma info in dumps</entry>
<entry><option>-dsuppress-type-signatures</option></entry>
<entry>Suppress type signatures</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dppr-user-length</option></entry>
<entry>Set the depth for printing expressions in error msgs</entry>
<entry><option>-dsuppress-type-applications</option></entry>
<entry>Suppress type applications</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-dsuppress-coercions</option></entry>
<entry>Suppress the printing of coercions in Core dumps to make them shorter</entry>
<entry>static</entry>
<entry>-</entry>
</row>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment