Day 29: Gotta love the flow

Wow.

Okay, so today I learned about a tool that makes my life a lot easier. Let me introduce you to the wonderful world of gcov:

- Gcov is a program that handles line counts for g++. As many might know, the University of Michigan exclusively uses C++ for their introduction courses to programming for the major. G++, or the GNU compiler of C++, is a common program that is easy to install yet, for the most part, does not give a lot of detail about program execution. This lead to a lot of frustration for me, as I needed to understand how my program was executing without needing a visual debugger to see what went wrong and to better understand where my code was taking too long or not being tested. While g++ has many, many, flags which allow us to see more common warnings, errors, and other information, the compiler fails to give us pure execution data in a readable format. This is where gcov comes into play. After running an output file using a command like ./a.out, you can write gcov -m source.cpp, where source.cpp is your source file, and see where your code executes and where it does not. This is especially important, as now you can see where your code does not execute, so you can write more comprehensive unit tests.

Comments

Popular posts from this blog

Day 37 (of Blogging): Back to the new normal.

Day 33: A weird day.

Day 36: Emotional Drainage