+2017-11-10 Martin Liska <mliska@suse.cz>
+
+ * coverage.c (coverage_init): Stream information about
+ support of has_unexecuted_blocks.
+ * doc/gcov.texi: Document that.
+ * gcov-dump.c (dump_gcov_file): Support it in gcov_dump tool.
+ * gcov.c (read_graph_file): Likewise.
+ (output_line_beginning): Fix a small issue with
+ color output.
+
2017-11-10 Bin Cheng <bin.cheng@arm.com>
* tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
gcov_write_unsigned (GCOV_NOTE_MAGIC);
gcov_write_unsigned (GCOV_VERSION);
gcov_write_unsigned (bbg_file_stamp);
+
+ /* Do not support has_unexecuted_blocks for Ada. */
+ gcov_write_unsigned (strcmp (lang_hooks.name, "GNU Ada") != 0);
}
}
is reachable via non-exceptional or exceptional paths.
Executed basic blocks having a statement with zero @var{execution_count}
end with @samp{*} character and are colored with magenta color with @option{-k}
-option.
+option. The functionality is not supported in Ada.
Note that GCC can completely remove the bodies of functions that are
not needed -- for instance if they are inlined everywhere. Such functions
printf ("%s:stamp %lu\n", filename, (unsigned long)stamp);
}
+ /* Support for unexecuted basic blocks. */
+ unsigned support_unexecuted_blocks = gcov_read_unsigned ();
+ if (!support_unexecuted_blocks)
+ printf ("%s: has_unexecuted_block is not supported\n", filename);
+
while (1)
{
gcov_position_t base, position = gcov_position ();
/* Stamp of the bbg file */
static unsigned bbg_stamp;
+/* Supports has_unexecuted_blocks functionality. */
+static unsigned bbg_supports_has_unexecuted_blocks;
+
/* Name and file pointer of the input file for the count data (gcda). */
static char *da_file_name;
bbg_file_name, v, e);
}
bbg_stamp = gcov_read_unsigned ();
+ bbg_supports_has_unexecuted_blocks = gcov_read_unsigned ();
while ((tag = gcov_read_unsigned ()))
{
if (count > 0)
{
s = format_gcov (count, 0, -1);
- if (has_unexecuted_block)
+ if (has_unexecuted_block
+ && bbg_supports_has_unexecuted_blocks)
{
if (flag_use_colors)
{