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

--- Comment #21 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to xaizek from comment #20)
> The patch works! I think you actually implemented behaviour of `-p` for `-l`
> (you hash path in the code and don't process includes). `-l` doesn't seem to
> make much sense for JSON, because all includes will be in the same object
> anyway, while `-p` does.

Oh, you are right, it should be fixed in the updated version of the patch.
Moreover, I also made a refactoring for non-JSON code where filenames are
created.

> 
> Thank you for making it work. I really think that's what users of gcov
> expect from those options.

Sure, you are right.

> 
> By the way, since this is another change related to automatic invocation of
> gcov. Just as lcov does it, I recently started to parse output of `gcov
> --help` with regexes in uncov to detect JSON support. This works, but it
> would be more reliable if gcov could print its capabilities in some fixed
> form to don't make tools do such things. Of course existing parsing code
> won't go away, but it might become a fallback for a more robust path.

Right now, one can easily detect JSON format with `gcov --help | grep
json-format`, am I right? What type of capability would you appreciate?

Reply via email to