[Bug gcov-profile/94928] New: Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

myron.walker at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat May 2 22:09:11 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

            Bug ID: 94928
           Summary: Doc comments in gcov-io.h do not show cwd and unexec
                    blocks in the Notes file format
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: myron.walker at gmail dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

The documentation of the notes file format below do not show the cwd or
unexec_blocks data items.

        note: unit function-graph*
        unit: header int32:checksum string:source
        function-graph: announce_function basic_blocks {arcs | lines}*
        announce_function: header int32:ident
                int32:lineno_checksum int32:cfg_checksum
                string:name string:source int32:start_lineno int32:start_column 
                int32:end_lineno
        basic_block: header int32:flags*
        arcs: header int32:block_no arc*
        arc:  int32:dest_block int32:flags
        lines: header int32:block_no line*
               int32:0 string:NULL
        line:  int32:line_no | int32:0 string:filename


When you look at the gcov.c file, you can see that at the beginning of the
notes file right after the stamp, there is an item for cwd and unexec blocks.

  bbg_stamp = gcov_read_unsigned();
  bbg_cwd = xstrdup(gcov_read_string());                 <<<<< Not documented
  bbg_supports_has_unexecuted_blocks = gcov_read_unsigned();   <<<<<< Not
documented


There also is a missing int32:artificial that should be between the function
name and function source file.

      function_name = xstrdup(gcov_read_string());
      unsigned artificial = gcov_read_unsigned();      <<<< Not documented
      unsigned src_idx = find_source(gcov_read_string());


More information about the Gcc-bugs mailing list