Useful, well-written software generally goes through different phases of application development, and mistakes can occur in each phase. Some phases come with their own set of mechanisms to detect certain mistakes; during compilation, for example, most compilers perform elementary semantic analysis, making sure objects such as variables and functions are adequately described.
The error-checking mechanisms of each application development phase helps catch simple and obvious mistakes in code. The debugging phase helps catch more subtle errors; ones that fell through the cracks during routine code inspection.
5.1. Installing Debuginfo Packages
Red Hat Enterprise Linux also provides -debuginfo packages for all architecture-dependent RPMs included in the operating system. A -debuginfo package contains accurate debugging information for its corresponding package. To install the -debuginfo package of a package (i.e. typically packagename-debuginfo), use the following command:
debuginfo-install packagename
Note
Attempting to debug a package without having its -debuginfo equivalent installed may fail, although GDB will try to provide any helpful diagnostics it can.