/* Gcov.c: prepend line execution counts and branch probabilities to a
source file.
- Copyright (C) 1990-2019 Free Software Foundation, Inc.
+ Copyright (C) 1990-2020 Free Software Foundation, Inc.
Contributed by James E. Wilson of Cygnus Support.
Mangled by Bob Manson of Cygnus Support.
Mangled further by Nathan Sidwell <nathan@codesourcery.com>
print_version (void)
{
fnotice (stdout, "gcov %s%s\n", pkgversion_string, version_string);
- fprintf (stdout, "Copyright %s 2019 Free Software Foundation, Inc.\n",
+ fprintf (stdout, "Copyright %s 2020 Free Software Foundation, Inc.\n",
_("(C)"));
fnotice (stdout,
_("This is free software; see the source for copying conditions.\n"
return;
json::object *lineo = new json::object ();
- lineo->set ("line_number", new json::number (line_num));
+ lineo->set ("line_number", new json::integer_number (line_num));
if (function_name != NULL)
lineo->set ("function_name", new json::string (function_name));
- lineo->set ("count", new json::number (line->count));
+ lineo->set ("count", new json::integer_number (line->count));
lineo->set ("unexecuted_block",
new json::literal (line->has_unexecuted_block));
if (!(*it)->is_unconditional && !(*it)->is_call_non_return)
{
json::object *branch = new json::object ();
- branch->set ("count", new json::number ((*it)->count));
+ branch->set ("count", new json::integer_number ((*it)->count));
branch->set ("throw", new json::literal ((*it)->is_throw));
branch->set ("fallthrough",
new json::literal ((*it)->fall_through));
function->set ("name", new json::string ((*it)->m_name));
function->set ("demangled_name",
new json::string ((*it)->get_demangled_name ()));
- function->set ("start_line", new json::number ((*it)->start_line));
- function->set ("start_column", new json::number ((*it)->start_column));
- function->set ("end_line", new json::number ((*it)->end_line));
- function->set ("end_column", new json::number ((*it)->end_column));
+ function->set ("start_line",
+ new json::integer_number ((*it)->start_line));
+ function->set ("start_column",
+ new json::integer_number ((*it)->start_column));
+ function->set ("end_line", new json::integer_number ((*it)->end_line));
+ function->set ("end_column",
+ new json::integer_number ((*it)->end_column));
function->set ("blocks",
- new json::number ((*it)->get_block_count ()));
+ new json::integer_number ((*it)->get_block_count ()));
function->set ("blocks_executed",
- new json::number ((*it)->blocks_executed));
+ new json::integer_number ((*it)->blocks_executed));
function->set ("execution_count",
- new json::number ((*it)->blocks[0].count));
+ new json::integer_number ((*it)->blocks[0].count));
functions->append (function);
}