The printed position should be the start of the record, as is the case
with lines.
Before:
ex.gcno: 795:
01470000: 16:CONDITIONS 2 conditions
ex.gcno: 811: block 2: 1
ex.gcno: 819: block 5: 1
ex.gcno: 819:
01000000: 50:FUNCTION ... `main' ...
After:
ex.gcno: 795:
01470000: 16:CONDITIONS 2 conditions
ex.gcno: 803: block 2: 1
ex.gcno: 811: block 5: 1
ex.gcno: 819:
01000000: 50:FUNCTION ... `main' ...
gcc/ChangeLog:
* gcov-dump.cc (tag_conditions): Read position before blocks,
terms.
{
for (unsigned ix = 0; ix != n_conditions; ix++)
{
+ const gcov_position_t position = gcov_position ();
const unsigned blockno = gcov_read_unsigned ();
const unsigned nterms = gcov_read_unsigned ();
printf ("\n");
- print_prefix (filename, depth, gcov_position ());
+ print_prefix (filename, depth, position);
printf (VALUE_PADDING_PREFIX "block %u:", blockno);
printf (" %u", nterms);
}