develooper Front page | perl.perl5.porters | Postings from September 2006

Re: perl.gcov

Thread Previous
From:
Jim Cromie
Date:
September 28, 2006 14:17
Subject:
Re: perl.gcov
Message ID:
451C3C00.5050800@gmail.com
Steve Peters wrote:
>
> Sometimes, libgcov.a isn't exactly where its expected, so, sometimes
> adding -lgcov and -L/path/to/libgcov.a is needed for everything to compile
> and work correctly.
>
>   

Ive simplified my problem down to

$ cc -fprofile-arcs -ftest-coverage hzloop.c -o hzloop

it produces a hzloop exe, which nm tells me has gcov parts linked in 
statically
08048a7c t gcov_write_block
08048bc8 T __gcov_write_counter
08048c10 T __gcov_write_summary
08048bf0 T __gcov_write_tag_length
08048bb0 T __gcov_write_unsigned
...
so it appears that the additions you suggested are unnecessary (in this 
simple case at least)

That said, it doesnt work (so isnt a perl problem per se)
$ gcov hzloop.c
hzloop.gcda:cannot open data file
it does write hzloop.gcno at least, which is more than I get from perl.gcov.

googling shows other reports of the same error msg,
apparently (partly) related to a regression around 3.4.4
Im on FC-4,  gcc-4.0.2, binutils-2.15.94.0.2.2-2.1

Is anyone here on a newer gcc, and sees the problem still ?



Also, the gcov functions linked in from libgcov.a are not available to 
extensions
(hence the earlier B errors).

Is there some incantation/hack to make those functions (linked into the exe)
available to extensions ?  is that what ext.libs is for ?

> Steve Peters
> steve@fisharerojo.org
>
>   
tia
jimc

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About