Astroman (sent by Nabble.com) wrote:
I am working on a piece of software that never exits and I am trying to use
-fprofile-arcs and gcov to gather coverage data on it.
The code looks like this:
int main(){
while(1){
foo();
nanosleep(50);
}
}
This is a child process that as you can see will never exit on its own so
eventually it is just signal killed by the parent process. This code could be
changed to exit properly but that is not an option in this case. I am
compiling the code with -fprofile-arcs and -ftest-coverage and I am able to
obtain accurate coverage data for all the files in the project that exit
normally. Is there any way to collect the .da file data before exit? Is it
temporarily stored anywhere or could I alter the gcc library to store this
information more often?
call __gcov_flush
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
[EMAIL PROTECTED] :: http://www.planetfall.pwp.blueyonder.co.uk