Code coverage tool for C

K

Kai Zhu

Can anybody show me a list of such tools so that I can pick up the tools
match my requirement.
 
J

Jack Klein

Can anybody show me a list of such tools so that I can pick up the tools
match my requirement.

There are no such tools defined by the C language, which means that
the question is not really topical here.

I would suggest you try or a Google search.
 
P

Pierre Asselin

Kai Zhu said:
Can anybody show me a list of such tools so that I can pick up the tools
match my requirement.

gcc has options to instrument the code and generate
line-by-line execution counts.

If anyone knows the Windows equivalent, I'd like
to hear it.
 
F

Flash Gordon

Pierre Asselin wrote, On 05/03/07 15:05:
gcc has options to instrument the code and generate
line-by-line execution counts.

If anyone knows the Windows equivalent, I'd like
to hear it.

Well, you could try gcc...

Specific tools are off topic here, but the gcc suggestion was not a joke.
 
C

CBFalconer

Pierre said:
gcc has options to instrument the code and generate
line-by-line execution counts.

If anyone knows the Windows equivalent, I'd like to hear it.

Just use gcc with the -pg operion and gprof for analysis. DJGPP,
MingW, and Cygwin will run gcc on winblows.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
 
P

Pierre Asselin

CBFalconer said:
Just use gcc with the -pg operion and gprof for analysis. DJGPP,
MingW, and Cygwin will run gcc on winblows.

That's for profiling, not code coverage. The gcc options
for code coverage are -fprofile-arcs -ftest-coverage .
Then you use the gcov utility to analyze the results.
 
C

CBFalconer

Pierre said:
That's for profiling, not code coverage. The gcc options
for code coverage are -fprofile-arcs -ftest-coverage .
Then you use the gcov utility to analyze the results.

You're right. Thanks for the correction.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top