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

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 13 13:38:04 GMT 2020


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

--- Comment #23 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Myron Walker from comment #22)
> It does the same things a gcov and lcov  combined but in python.  It also
> does merging of data but in a different way than gcov-tool.  I might need to
> change that.

Yes, please use gcov-tool for the merging.

> Another part of it is to allow access to different types of
> resource location hinting.  so a gcov prefix for a source code might be a
> github url and token.  A gcno file hint might be a web url or sub or nfs
> share.  Like wise the data file hints might be http, smb or nfs prefixes.

That should be done by your script. I realized that for the JSON format you
only need to put together .gcda and .gcno files:

$ ls
tramp3d-v4.gcda  tramp3d-v4.gcno
$ gcov tramp3d-v4.gcda -i
...
$ gunzip tramp3d-v4.gcda.gcov.json.gz
$ cat tramp3d-v4.gcda.gcov.json | python -m json.tool | grep '"file"'
            "file": "tramp3d-v4.cpp",
            "file": "/usr/include/c++/6/ext/new_allocator.h",
            "file": "/usr/include/c++/6/ext/aligned_buffer.h",
            "file": "/usr/include/c++/6/bits/move.h",
            "file": "/usr/include/c++/6/bits/alloc_traits.h",
            "file": "/usr/include/c++/6/bits/stl_list.h",
            "file": "/usr/include/c++/6/bits/allocator.h",
            "file": "/usr/include/c++/6/bits/allocated_ptr.h",
            "file": "/usr/include/c++/6/bits/stl_iterator.h",
            "file": "/usr/include/c++/6/bits/list.tcc",
            "file": "/usr/include/c++/6/bits/stl_vector.h",
            "file": "/usr/include/c++/6/iostream",
            "file": "/usr/include/c++/6/bits/stl_construct.h",
            "file": "/usr/include/c++/6/bits/stl_uninitialized.h",
            "file": "/usr/include/c++/6/bits/vector.tcc",
            "file": "/usr/include/c++/6/bits/stl_algobase.h",
            "file": "/usr/include/c++/6/bits/stl_pair.h",
            "file": "/usr/include/c++/6/bits/cpp_type_traits.h",
            "file": "/usr/include/c++/6/bits/stl_bvector.h",
            "file": "/usr/include/c++/6/ext/alloc_traits.h",
            "file": "/usr/include/c++/6/bits/predefined_ops.h",
            "file": "/usr/include/c++/6/bits/stl_heap.h",
            "file": "/usr/include/c++/6/bits/stl_iterator_base_funcs.h",
            "file": "/usr/include/c++/6/bits/stl_iterator_base_types.h",
            "file": "/usr/include/c++/6/bits/stl_tree.h",
            "file": "/usr/include/c++/6/bits/stl_algo.h",
            "file": "/usr/include/c++/6/ext/type_traits.h",
            "file": "/usr/include/c++/6/bits/stl_function.h",
            "file": "/usr/include/c++/6/bits/basic_string.tcc",
            "file": "/usr/include/c++/6/bits/basic_string.h",
            "file": "/usr/include/c++/6/bits/stl_map.h",
            "file": "/usr/include/c++/6/iomanip",
            "file": "/usr/include/c++/6/limits",
            "file": "/usr/include/c++/6/new",
            "file": "/usr/include/c++/6/bits/char_traits.h",
            "file": "/usr/include/c++/6/cmath",

And now your script can find and get the corresponding source files.

> 
> https://github.com/myronww/pycover
> 
> Still a work in progress though.


More information about the Gcc-bugs mailing list