7

Which package has the debug symbols for gcov from the gcc package? I've tried installing gcc-5-dbgsym, but it didn't have the symbols.

Not a duplicate of [1]. As I mentioned I've already enabled the ddebs repositories, and installed the corresponding -dbgsym package. The gcov program is provided by the gcc-5 package as indicated by dpkg -S /usr/bin/gcov-5, but gcc-5-dbgsym does not include debugging symbols for gcov. Where are the debugging symbols for gcov?

[1] How to install debug symbols for installed packages?

Evan
  • 218

1 Answers1

0

I think this is an XY problem.

AFAICT, gcov doesn't have it's own debugging symbols. Research indicates that gcov is a test coverage program utilized along with gcc to analyze your programs to help create more efficient, faster running code and to discover untested parts of your program.

gcov uses two files for profiling. The names of these files are derived from the original object file by substituting the file suffix with either .gcno, or .gcda. The files contain coverage and profile data stored in a platform-independent format. The .gcno files are placed in the same directory as the object file. By default, the .gcda files are also stored in the same directory as the object file, but the GCC -fprofile-dir option may be used to store the .gcda files in a separate directory.

The .gcno notes file is generated when the source file is compiled with the GCC -ftest-coverage option. It contains information to reconstruct the basic block graphs and assign source line numbers to blocks.

The .gcda count data file is generated when a program containing object files built with the GCC -fprofile-arcs option is executed. A separate .gcda file is created for each object file compiled with this option. It contains arc transition counts, value profile counts, and some summary information.

It is not recommended to access the coverage files directly. Consumers should use the intermediate format that is provided by gcov tool via --intermediate-format option.

Unless I'm entirely misunderstanding the intent behind your question, you are looking for GDB: The GNU Project Debugger which is available for all currently supported versions of Ubuntu and may already be installed.

EDIT: Based on your comment you seem to actually be looking for a tutorial on using GDB. There's one available here. I hope this helps you.

Sources: https://gcc.gnu.org/onlinedocs/

Specifically:

https://gcc.gnu.org/onlinedocs/gcc/Gcov-Intro.html

https://gcc.gnu.org/onlinedocs/gcc/Gcov-Data-Files.html#Gcov-Data-Files

the documentation for gdb can be found here

You might also find this useful specifically for this.

Elder Geek
  • 36,752