Common RejectNegative Var(flag_dump_analyzer_exploded_nodes_3)
Dump a textual representation of the exploded graph to SRCFILE.eg-ID.txt.
+fdump-analyzer-exploded-paths
+Common RejectNegative Var(flag_dump_analyzer_exploded_paths)
+Dump a textual representation of each diagnostic's exploded path to SRCFILE.IDX.KIND.epath.txt.
+
fdump-analyzer-feasibility
Common RejectNegative Var(flag_dump_analyzer_feasibility)
Dump various analyzer internals to SRCFILE.*.fg.dot and SRCFILE.*.tg.dot.
inform_n (loc, num_dupes,
"%i duplicate", "%i duplicates",
num_dupes);
+ if (flag_dump_analyzer_exploded_paths)
+ {
+ auto_timevar tv (TV_ANALYZER_DUMP);
+ pretty_printer pp;
+ pp_printf (&pp, "%s.%i.%s.epath.txt",
+ dump_base_name, sd.get_index (), sd.m_d->get_kind ());
+ char *filename = xstrdup (pp_formatted_text (&pp));
+ epath->dump_to_file (filename, eg.get_ext_state ());
+ inform (loc, "exploded path written to %qs", filename);
+ free (filename);
+ }
}
delete pp;
}
return true;
}
-/* Dump this path in multiline form to PP. */
+/* Dump this path in multiline form to PP.
+ If EXT_STATE is non-NULL, then show the nodes. */
void
-exploded_path::dump_to_pp (pretty_printer *pp) const
+exploded_path::dump_to_pp (pretty_printer *pp,
+ const extrinsic_state *ext_state) const
{
for (unsigned i = 0; i < m_edges.length (); i++)
{
eedge->m_src->m_index,
eedge->m_dest->m_index);
pp_newline (pp);
+
+ if (ext_state)
+ eedge->m_dest->dump_to_pp (pp, *ext_state);
}
}
/* Dump this path in multiline form to FP. */
void
-exploded_path::dump (FILE *fp) const
+exploded_path::dump (FILE *fp, const extrinsic_state *ext_state) const
{
pretty_printer pp;
pp_format_decoder (&pp) = default_tree_printer;
pp_show_color (&pp) = pp_show_color (global_dc->printer);
pp.buffer->stream = fp;
- dump_to_pp (&pp);
+ dump_to_pp (&pp, ext_state);
pp_flush (&pp);
}
/* Dump this path in multiline form to stderr. */
DEBUG_FUNCTION void
-exploded_path::dump () const
+exploded_path::dump (const extrinsic_state *ext_state) const
{
- dump (stderr);
+ dump (stderr, ext_state);
+}
+
+/* Dump this path verbosely to FILENAME. */
+
+void
+exploded_path::dump_to_file (const char *filename,
+ const extrinsic_state &ext_state) const
+{
+ FILE *fp = fopen (filename, "w");
+ if (!fp)
+ return;
+ pretty_printer pp;
+ pp_format_decoder (&pp) = default_tree_printer;
+ pp.buffer->stream = fp;
+ dump_to_pp (&pp, &ext_state);
+ pp_flush (&pp);
+ fclose (fp);
}
/* class feasibility_problem. */
exploded_node *get_final_enode () const;
- void dump_to_pp (pretty_printer *pp) const;
- void dump (FILE *fp) const;
- void dump () const;
+ void dump_to_pp (pretty_printer *pp,
+ const extrinsic_state *ext_state) const;
+ void dump (FILE *fp, const extrinsic_state *ext_state) const;
+ void dump (const extrinsic_state *ext_state = NULL) const;
+ void dump_to_file (const char *filename,
+ const extrinsic_state &ext_state) const;
bool feasible_p (logger *logger, feasibility_problem **out,
engine *eng, const exploded_graph *eg) const;
-fdump-analyzer-exploded-nodes @gol
-fdump-analyzer-exploded-nodes-2 @gol
-fdump-analyzer-exploded-nodes-3 @gol
+-fdump-analyzer-exploded-paths @gol
-fdump-analyzer-feasibility @gol
-fdump-analyzer-json @gol
-fdump-analyzer-state-purge @gol
one dump file per node, to @file{@var{file}.eg-@var{id}.txt}.
This is typically a large number of dump files.
+@item -fdump-analyzer-exploded-paths
+@opindex fdump-analyzer-exploded-paths
+Dump a textual representation of the ``exploded path'' for each
+diagnostic to @file{@var{file}.@var{idx}.@var{kind}.epath.txt}.
+
@item -fdump-analyzer-feasibility
@opindex dump-analyzer-feasibility
Dump internal details about the analyzer's search for feasible paths.