gcov question
Tiemen Schut
T.Schut at sron.nl
Fri Sep 3 07:12:43 UTC 2010
Hi,
>>> On 9/2/2010 at 16:33, in message <4C7FB5C4.1000801 at oarcorp.com>,
Joel Sherrill
<joel.sherrill at oarcorp.com> wrote:
> On 09/02/2010 08:42 AM, Mariana Solaro wrote:
> > Hello, I have a question about gcov an how to use it.
> > We are using the sparc ERC32 processor, and the RTEMS 4.10 version.
> > We've seen that there is a tool called gcov that allows it to
measure
> > the tests coverage. We dońt know exactly how to use it with RTEMS.
We
> > already try to compile the source code with the -ftest-coverage and
> > -fprofile-arcs options, but it only generates the .gcno files, and
not
> > the .gcda files, so when using gcov, the coverage indicated is 0%.
This is correct. The .gcno files are generated at compile time, the
.gcda files will be generated during runtime. After all, you'll only
have coverage > 0% if you've run the application at least once. So,
after compilation you'll have to run the application at least once to
generate coverage reports. Also note that the application has to exit
"nicely", after a segmentation fault the .gcda files will not be
generated. In general, exit(0) or sigterm should suffice.
> > When the linker starts it says that it can't find the __gcov_init
and
> > __gcov_merge_add functions.
You probably want to add -lgcov to the linker flags. It needs the gcov
libs, otherwise you'll get the error you mention.
> > So, I would like to know how to use the gcov and gprof tools with
RTEMS
> > if it is posible.
> >
> >
> Maybe someone can help you with gcov but the rtems coverage
> is not generated that way.
>
> We can help you apply the RTEMS coverage analysis tools to
> your application. It is one of those areas we would like to
> consult in to help pay the RTEMS bills. :)
> > Thank You!
> >
> > Bye
> >
> > _______________________________________________
> > rtems-users mailing list
> > rtems-users at rtems.org
> > http://www.rtems.org/mailman/listinfo/rtems-users
> >
Good luck!
Tiemen Schut
More information about the users
mailing list