Console front-end to the GNU debugger
Clone or download
gregory-nisbet and brasko fix memory leak in tdb_get_gdb_command
Signed-off-by: Gregory Nisbet <>
Latest commit b88b697 Jul 16, 2018
Failed to load latest commit information.
cgdb Fix issue #161 - CGDB no longer freezes on non matching regex search Mar 30, 2018
config Add stdlib.h for exit command to fix CC=g++ configuration Jul 22, 2016
doc Remove the help2man integration Mar 3, 2017
lib fix memory leak in tdb_get_gdb_command Jul 24, 2018
packages Update sourceforge links to github Aug 6, 2016
test Replace the last use of std_list_ptr with std::map Nov 16, 2017
.gitignore Update .gitignore when building in tree. Jan 13, 2017 Reformat code style with GNU indent. Jul 14, 2012
AUTHORS Add Michael Sartain as a CGDB Author. Jan 6, 2017 Reverting the Developer's Certificate of Origin to match the source Apr 3, 2018
COPYING Initial configure work Jan 28, 2003
ChangeLog Remove individual ChangeLog files. Jul 12, 2012
FAQ Remove flex generaed parsers from revision control. Aug 12, 2016
INSTALL git checkouts require in INSTALL Feb 2, 2017 Enabled portablity warnings Apr 19, 2018
NEWS Fix issue #161 - CGDB no longer freezes on non matching regex search Mar 30, 2018 Updated README to include secure links Apr 2, 2018 Allow setting CGDB_VERSION environment for Aug 6, 2016 Get cgdb ready for another release Mar 7, 2017 Move attribute macros to a single location. Jul 31, 2016
configure.init Remove std_list interface and now all of lib/adt Nov 16, 2017
release-todo.txt Committing cgdb-0_6_8 release. Nov 14, 2014
roadmap.txt Fix spelling mistakes. Jul 22, 2016


CGDB is a very lightweight console frontend to the GNU debugger. It provides a split screen interface showing the GDB session below and the program's source code above. The interface is modelled after vim's, so vim users should feel right at home using it.

Screenshot, downloads, and documentation are available from the home page:

Official source releases are available here:

Build Instructions


You must have the following packages installed.

  • sh
  • autoconf
  • automake
  • aclocal
  • autoheader
  • libtool
  • flex
  • bison
  • gcc/g++ (c11/c++11 support)

Preparing the configure

Run ./ in the current working directory to generate the configure script.

Running configure, make and make install

You can run ./configure from within the source tree, however I usually run configure from outside the source tree like so,

mkdir ../build
cd ../build
../cgdb/configure --prefix=$PWD/../prefix
make -srj4
make install

CGDB is a C11/C++11 project, just like GDB. Since the standard is relatively new, your gcc/g++ may support it out of the box, or may require the -std=c11 and -std=c++11 flags. You can see how to set these flag in the below configure invocation.

I typically enable more error checking with the build tools like so,

YFLAGS="-Wno-deprecated" CFLAGS="-std=c11 -g -O0 -Wall -Wextra -Wshadow -pedantic -Wno-unused-parameter" CXXFLAGS="-std=c++11 -g -O0 -Wall -Wextra -Wshadow -Werror -pedantic -Wmissing-include-dirs -Wno-unused-parameter -Wno-sign-compare -Wno-unused-but-set-variable -Wno-unused-function -Wno-variadic-macros" ../cgdb/configure --prefix=$PWD/../prefix

If you like to have a silent build, and the libtool link lines are bothering you, you can set this environment variable to suppress libtools printing of the link line,