SimonKagstrom / kcov

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
http://simonkagstrom.github.io/kcov/
GNU General Public License v2.0
709 stars 109 forks source link

Merge some/all of the zig improvements by liyu1981 #423

Open SimonKagstrom opened 5 months ago

SimonKagstrom commented 5 months ago

I.e., this fork:

https://github.com/liyu1981/kcov

@liyu1981, some input?

liyu1981 commented 5 months ago

@SimonKagstrom I am glad that you find this work.

Currently the implementation of my hack is based on string comparison as from the semantics level I do not find good ways of doing that. I am not sure whether this is something kcov prefer, but I can prepare it in a pull request for discussion.

I have prepared #424 containing the core changes to kcov to support. We can discuss on top of that see whether it is a good way of adding zig support, or point me to the good way.

SimonKagstrom commented 5 months ago

I think the string comparison is fine. I guess probably other tools would do it that way as well.

The only real comment I have (see the PR) is that I think the comparison can be done in reporter.cc instead, and not in each writer, but feel free to try that out!

Thanks!