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
710 stars 109 forks source link

OSX: Code covered: NaN% - #379

Closed wop55 closed 1 year ago

wop55 commented 2 years ago

Compiled a test program: gcc main.c -o hello

The program is a small main function with some if statements depending on argv.

running: ../kcov /tmp ./hello 1 2 3 4

the generated index.html file says that 0 lines instrumented, and NAN coverage was generated.

What am I missing?

SimonKagstrom commented 2 years ago

You'll need debug symbols, so try compiling with

gcc -g main.c -o hello