Menu

#1 Collect coverage information for libraries

open
nobody
None
5
2010-02-20
2010-02-20
No

Hi,
currently bcov seems to be unable to collect coverage information about used libraries. Attached is a simple example

Unpack it, call "make", call "make coverage" and see that .bcovdump only contains information about test.c, not libtest.c

Discussion

  • Sebastian Dröge

    This is also with latest GIT btw, even after the following two commits:

    commit 0ffd54a8bccaca77f6a2c0b470bfa741c53d7512
    Author: Stefan Kost <ensonic@users.sf.net>
    Date: Tue Jan 12 10:05:49 2010 +0200

    libbase: determine library base addresses and apply to breakpoints

    Read /proc/<pid>/maps to determine the library base addresses. Use them when
    setting the break points for libraries.

    commit ca6d49fc836ce1c2cfde621b59581734babfea3e
    Author: Stefan Kost <ensonic@users.sf.net>
    Date: Tue Jan 12 10:03:30 2010 +0200

    coverage: load debug symbols for libraries

    We run the debugger loop once to ensure the libaries are also loaded.

     
  • Sebastian Dröge

    Ah, you have to call it with -l$library name. But even then it claims that the library function is never called.

     
  • Sebastian Dröge

    New Makefile, which adds -llibtest.so to bcov commandline

     

Log in to post a comment.