Code coverage tool for C

Discussion in 'C Programming' started by Kai Zhu, Mar 5, 2007.

  1. Kai Zhu

    Kai Zhu Guest

    Can anybody show me a list of such tools so that I can pick up the tools
    match my requirement.
     
    Kai Zhu, Mar 5, 2007
    #1
    1. Advertising

  2. Kai Zhu

    Jack Klein Guest

    On Mon, 5 Mar 2007 10:30:03 +0800, "Kai Zhu" <> wrote
    in comp.lang.c:

    > 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 news:comp.software-eng, or a Google search.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://c-faq.com/
    comp.lang.c++ http://www.parashift.com/c -faq-lite/
    alt.comp.lang.learn.c-c++
    http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
     
    Jack Klein, Mar 5, 2007
    #2
    1. Advertising

  3. Kai Zhu <> wrote:
    > 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.

    --
    pa at panix dot com
     
    Pierre Asselin, Mar 5, 2007
    #3
  4. Kai Zhu

    Flash Gordon Guest

    Pierre Asselin wrote, On 05/03/07 15:05:
    > Kai Zhu <> wrote:
    >> 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.


    Well, you could try gcc...

    Specific tools are off topic here, but the gcc suggestion was not a joke.
    --
    Flash Gordon
     
    Flash Gordon, Mar 5, 2007
    #4
  5. Kai Zhu

    user923005 Guest

    On Mar 5, 7:05 am, (Pierre Asselin) wrote:
    > Kai Zhu <> wrote:
    > > 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.


    I get 426000 hits for this query:
    http://www.google.com/search?client...&hl=en&q=c "code coverage"&btnG=Google Search
     
    user923005, Mar 5, 2007
    #5
  6. Kai Zhu

    CBFalconer Guest

    Pierre Asselin wrote:
    > Kai Zhu <> wrote:
    >
    >> 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.


    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
     
    CBFalconer, Mar 6, 2007
    #6
  7. CBFalconer <> wrote:

    > 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.


    --
    pa at panix dot com
     
    Pierre Asselin, Mar 6, 2007
    #7
  8. Kai Zhu

    CBFalconer Guest

    Pierre Asselin wrote:
    > CBFalconer <> wrote:
    >
    >> 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.


    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
     
    CBFalconer, Mar 6, 2007
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. milesd
    Replies:
    4
    Views:
    1,687
    Dale King
    Aug 29, 2003
  2. bill turner
    Replies:
    2
    Views:
    1,151
    bill turner
    Jul 19, 2005
  3. Raj
    Replies:
    4
    Views:
    7,853
    asicvlsi
    Feb 21, 2008
  4. Ben Finney
    Replies:
    7
    Views:
    555
    Ned Batchelder
    Oct 30, 2007
  5. Replies:
    0
    Views:
    403
Loading...

Share This Page