Re: Getting gcov's output when the program is killed

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

 



Ludovic Courtès wrote:
Hello,

I’m doing test coverage on a daemon.  The daemon is tested by a script
that launches it and eventually terminates it with kill(1).  However,
the corresponding gcda files are not updated with actual coverage data.

How can gcov be told to flush its coverage data to disk when the program
is killed?

Thanks,
Ludo’.

maybe you can modify slightly your deamon, catch the signal
and do a "clean" exit by calling "exit" in the signal handler
or something?
And have a conditional in your code to include/exclude that
behavior depending if you compile with coverage or not.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux