Thursday, April 20, 2017

OpenDNP3: What the *&^% are all these gcda files?

I downloaded some open source, and made some customization to it. The framework was in C/C++, and architected at a level that is more complex and sophisticated than many code bases I have seen.

I noticed that when I would run the application as a power user (i.e. root), it would write out a bunch of ".gcda" files.  And, one time when I ran it as a non-power user, it had trouble writing those files out, and the application produced errors (it may not have even run, I can't remember).

Well, tonight, I finally looked into the topic of what a gcda file actually is.

It is a code coverage, or code profiling tool.

You compile with a certain flag called --coverage (using gcc on Linux here), and then the GCOV framework enables these gcda files to be generated. These are binary statistics files that are updated over time as the program is run, and upon proper exit of the application.

http://bobah.net/d4d/tools/code-coverage-with-gcov


No comments:

Zabbix to BigPanda Webhook Integration

Background BigPanda has made its way into the organization. I wasn't sure at first why, given that there's no shortage of Network Mo...