MCPcopy Index your code
hub / github.com/cgdb/cgdb

github.com/cgdb/cgdb @v0.8.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.8.0 ↗ · + Follow
1,245 symbols 3,118 edges 80 files 241 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CGDB

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: https://cgdb.github.io

Official source releases are available here: https://cgdb.me/files/

Build Instructions

Dependencies

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 ./autogen.sh 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,

LIBTOOLFLAGS=--silent

Core symbols most depended-on inside this repo

clog_error
called by 95
lib/util/clog.h
if_draw
called by 27
cgdb/interface.cpp
cgdbrc_get_int
called by 27
cgdb/cgdbrc.cpp
swin_mvwprintw
called by 24
lib/util/sys_win.cpp
setpenattr_bool
called by 24
lib/vterm/pen.c
cgdb_malloc
called by 23
lib/util/sys_util.cpp
vterm_push_output_sprintf_ctrl
called by 23
lib/vterm/vterm.c
gdbwire_strdup
called by 22
lib/tgdb/gdbwire.c

Shape

Function 845
Class 254
Enum 126
Method 20

Languages

C++71%
C29%
Rust1%
Go1%

Modules by API surface

lib/tgdb/gdbwire.c188 symbols
lib/tgdb/tgdb.cpp82 symbols
cgdb/interface.cpp72 symbols
lib/tgdb/gdbwire.h60 symbols
cgdb/cgdbrc.cpp60 symbols
cgdb/sources.cpp51 symbols
lib/kui/kui.cpp49 symbols
lib/vterm/state.c48 symbols
lib/util/sys_win.cpp44 symbols
cgdb/cgdb.cpp41 symbols
lib/vterm/screen.c40 symbols
cgdb/highlight_groups.cpp36 symbols

For agents

$ claude mcp add cgdb \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page