[Bug gcov-profile/53406] New: Unit Record not present in header files or in GCOV output
myron.walker at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri May 18 17:53:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53406
Bug #: 53406
Summary: Unit Record not present in header files or in GCOV
output
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: myron.walker@gmail.com
The GCOV file format detailed in the gcov-io.h header file describe unit record
in the .gcno files like so:
unit: header int32:checksum string:source
and in the .gcda files like so:
unit: header int32:checksum
When I use the code coverage tools on Ubuntu 11.10 that uses GCC 4.6.1. The
.gcno and .gcda files that are produced do not contain this record.
Also when you look at the TAG definitions in the header file there isn't a tag
declared for this record type. see below:
/* The record tags. Values [1..3f] are for tags which may be in either
file. Values [41..9f] for those in the note file and [a1..ff] for
the data file. The tag value zero is used as an explicit end of
file marker -- it is not required to be present. */
#define GCOV_TAG_FUNCTION ((gcov_unsigned_t)0x01000000)
#define GCOV_TAG_FUNCTION_LENGTH (2)
#define GCOV_TAG_BLOCKS ((gcov_unsigned_t)0x01410000)
#define GCOV_TAG_BLOCKS_LENGTH(NUM) (NUM)
#define GCOV_TAG_BLOCKS_NUM(LENGTH) (LENGTH)
#define GCOV_TAG_ARCS ((gcov_unsigned_t)0x01430000)
#define GCOV_TAG_ARCS_LENGTH(NUM) (1 + (NUM) * 2)
#define GCOV_TAG_ARCS_NUM(LENGTH) (((LENGTH) - 1) / 2)
#define GCOV_TAG_LINES ((gcov_unsigned_t)0x01450000)
#define GCOV_TAG_COUNTER_BASE ((gcov_unsigned_t)0x01a10000)
#define GCOV_TAG_COUNTER_LENGTH(NUM) ((NUM) * 2)
#define GCOV_TAG_COUNTER_NUM(LENGTH) ((LENGTH) / 2)
#define GCOV_TAG_OBJECT_SUMMARY ((gcov_unsigned_t)0xa1000000)
#define GCOV_TAG_PROGRAM_SUMMARY ((gcov_unsigned_t)0xa3000000)
#define GCOV_TAG_SUMMARY_LENGTH \
(1 + GCOV_COUNTERS_SUMMABLE * (2 + 3 * 2))
More information about the Gcc-bugs
mailing list