Introduction to GDB

GDB, the GNU Project debugger, allows you to see what is going on “inside” another program while it executes -- or what another program was doing at the moment it crashed. Note that GDB is most effective when tracing programs and libraries that were built with debugging symbols and not stripped.

This package is known to build and work properly using an LFS 7.8-systemd platform.

Package Information

GDB Dependencies


DejaGnu-1.5.3 (for tests), Doxygen-1.8.10, Guile-2.0.11, Python-2.7.10, and SystemTap (optional runtime dependency, also used in a few tests).

User Notes:

Installation of GDB

Install GDB by running the following commands:

./configure --prefix=/usr --with-system-readline &&

Optionally, to build the API documentation using Doxygen-1.8.10, run:

make -C gdb/doc doxy

To run the test suite, issue the following commands:

pushd gdb/testsuite &&
make     site.exp &&
echo "set gdb_test_timeout 120" >> site.exp &&
runtest TRANSCRIPT=y

There are many problems with the test suite. Your results will depend on installed compilers, as well as whether or not you are running it locally or remotely. Although we do extend the timeout above, there are still many tests that will time out. Note that by changing the timeout value, the number of tests is no longer conserved. There are also failures associated with system readline 6.x among others. Unexpected failures should be about 0.5%.

Now, as the root user:

make -C gdb install

If you have built the API documentation, it is now in gdb/doc/doxy. You can install it (as the root user):

install -d /usr/share/doc/gdb-7.10 &&
rm -rf gdb/doc/doxy/xml &&
cp -Rv gdb/doc/doxy /usr/share/doc/gdb-7.10


Installed Programs: gcore, gdb and gdbserver
Installed Library:
Installed Directories: /usr/include/gdb and /usr/share/gdb

Short Descriptions


generates a core dump of a running program.


is the GNU Debugger.


is a remote server for the GNU debugger (it allows programs to be debugged from a different machine).

contains functions for the in-process tracing agent. The agent allows for installing fast tracepoints, listing static tracepoint markers, probing static tracepoints markers, and starting trace monitoring.

Last updated on 2015-10-03 19:54:13 +0000