I'm trying to debug a code using GDB in a Fedora machine. It produces this message each time I run it.

Missing separate debuginfos, use: debuginfo-install glibc-2.18-12.fc20.x86_64 libgcc-4.8.3-1.fc20.x86_64 libstdc++-4.8.3-1.fc20.x86_64

My questions:

  1. Should these packages be in GDB by default?
  2. What is the function of each of these packages?
  3. In real production environments should these packages be installed for GDB?
  4. Is it ok if I do not install these packages? What will be the effect?
  1. No. gdb is packaged by a maintainer, glibc is packaged by another maintainer, gcc, libstdc and so on all all packaged by different maintainers. To package the debuginfo for these along with gdb would take considerable coordination. Each time one of the packages changed, the gdb maintainer would have to repackage and release. It would become quite cumbersome to manage. gdb can also debug other languages, for example java, which wouldn't need the debuginfo for the libraries listed.

  2. The debuginfo packages contain the source code and symbols stripped from the executable. They are only required during debugging, therefore are redundant during normal use. They do take up a fair amount of space, therefore are stripped during production releases.

  3. It depends. Most C code will use glibc etc. However, if you're debugging package X and don't need to delve into the internals of glibc you could manage without installing it. If you want to follow the code in gdb all the way to the low-level glibc, or if you think there's a bug in the library itself, then you'll need to install it. On the other hand, some C code might be statically linked and should have everything needed within it's own debuginfo package, or an application could be written in another language. Neither would need these installed.

  4. Yes. The effect of not installing these packages is that you will not be able to debug effectively into the routines provided by them. As in 3 above, it all depends on whether you need to debug at that level or not.

Note: You'll find that many applications have been optimised (with the -O flag in the compiler) and don't debug that well with debuginfo. A workaround is to recompile without any optimisation.

| improve this answer | |

Your Answer

