bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] Re: gcov/lcov problems


From: Alfred M. Szmidt
Subject: [bug-inetutils] Re: gcov/lcov problems
Date: Sun, 31 Oct 2010 18:25:28 -0400

   > Was trying to have some fun and get `make coverage' working, but I'm
   > hitting some werido problems that I don't understand.  Does anyone
   > know why this happens, and how to fix it?
   >
   > Processing src/tftp.gcda
   > Processing src/tftp.gcda
   > <built-in>:cannot open source file
   > geninfo: ERROR: cannot read <built-in>.gcov!

   I've seen this too for other projects, and it is generally some
   confusion about which directory to search for the *.gcda file.  If
   you strace lcov you will see that it is searching for the file at
   the wrong place.  Sometimes I create symlinks to work around this
   (the output seems OK) if I really want to get the output, but it
   would be great if this was tracked down and fixed properly.

Hm.  That is not at all what I'm seeing:

| write(1, "TN:\n", 4TN:
| )                    = 4
| open("built-in>.gcov", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or 
directory)
| write(2, "geninfo: ERROR: cannot read <bui"..., 45geninfo: ERROR: cannot read 
<built-in>.gcov!
| ) = 45

It is trying to open "built-in>.gcov" which of course doesn't exist,
while it should try to open "<built-in>.gov", and just print a warning
since "<built-in>" cannot be found.  The code in lcov that causes this is from 
geninfo:

| sub read_gcov_header($)
| {
|     my $source;
|     my $object;
|     local *INPUT;
|    
|     if (!open(INPUT, $_[0]))
|     {
|       if ($ignore_errors[$ERROR_GCOV])
|       {
|           warn("WARNING: cannot read $_[0]!\n");
|           return (undef,undef);
|       }
|       die("ERROR: cannot read $_[0]!\n");
|     }

Why it is trying to open "built-in>.gcov" is a complete and utter
mystery to me...  Anyone know of any perl to be able to fix this?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]