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?

  • 1
    Not a duplicate. How to I un-mark as a duplicate?
    – Evan
    Apr 23, 2018 at 16:44
  • I edited the question to describe why it is not a duplicate. What more are you looking for?
    – Evan
    Apr 23, 2018 at 17:51
  • you should ping at least one of the mentioned users with @username.
    – dessert
    Apr 25, 2018 at 19:27
  • 1
    Related meta question (for the record): meta.askubuntu.com/questions/17858/…
    – Melebius
    Apr 26, 2018 at 6:52

1 Answer 1


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/




the documentation for gdb can be found here

You might also find this useful specifically for this.

  • 1
    I'm looking for the debug symbols for gcov itself. When I run gcov I'm getting a segfault and I want to debug that error. i.e. print a back trace and values of some variables using GDB.
    – Evan
    May 11, 2018 at 12:36
  • Gcov is a c program source. GCC can generate debugging symbols for every C program it compiles.
    – Evan
    May 11, 2018 at 12:43
  • @Evan Right an X Y problem. At the risk of repeating myself "gcov doesn't have it's own debugging symbols. "
    – Elder Geek
    May 11, 2018 at 17:59
  • @Evan updated answer
    – Elder Geek
    May 11, 2018 at 20:45
  • I disagree that it is an X Y problem. I want the debug symbols for gcov, but the dbgsym package doesn't have them. I already know how to use GDB, that's why I want the debug symbols. Ubuntu debug symbols are better than sources because you don't have to issue those extra gdb commands.
    – Evan
    May 14, 2018 at 12:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .