CGDB
A curses debugger

Description

CGDB is a curses-based interface to the GNU Debugger (GDB). The goal of CGDB is to be lightweight and responsive; not encumbered with unnecessary features.

The interface is designed to deliver the familiar GDB text interface, with a split screen showing the source as it executes. The UI is modeled on the classic Unix text editor, vi. Those familiar with vi should feel right at home using CGDB.

The library responsible for communicating with GDB is called Trivial GDB (tgdb, or more accurately, libtgdb). This abstraction allows the UI code to be independent of the debugger, as well as greatly simplifying its implementation.

Those wanting to develop other interfaces to GDB are welcome to use libtgdb as the basis for their program. Many of the headaches of parsing GDB's output and annotations can be avoided by using it.

Some features offered by CGDB are:

  • Syntax-highlighted source window
  • Visual breakpoint setting
  • Keyboard shortcuts for common functions
  • Searching source window (using regexp)
  • Tab Completion
News
April 9, 2006
CGDB v0.6.2 was released today, see the download page to try it out. This release get's CGDB working on Solaris again. Also, it fixes some autotool problems that could have cause corruption in the GDB window. It also fixes a regression from cgdb-0.6.1, the message 'CGDB had unexpected results, ...' will no longer be displayed when shutting CGDB down if you set a watch point while debugging.

Enjoy.

Mar 6, 2006
CGDB v0.6.1 was released today, see the download page to try it out. This contains a very exciting new feature, along with several important tab completion improvements and a major bug fix.

Thanks to Steve Folta, CGDB now fully supports configurable color highlighting. You can modify any highlighting group or color that you want by simply using the :highlight command. This is modeled after vim, and should work the same. Also, you should be able to run CGDB in an xterm with a white background! Thanks Steve.

CGDB's tab completion has been improved to include interaction with the user when there is a lot of items to display. It's been said that it took 8 minutes for the completion to finish, so this feature was necessary. It should page exactly the way GDB does. If not, let me know. Also, CGDB now supports the C++ tab completion syntax with GDB. For example b 'foo::\t' turns into b 'foo::bar ()'.

Finally, CGDB fixed an important bug. Resizing the terminal was broken. It should work fine now, please let me know otherwise.

The CGDB Team hopes you enjoy the new release. As usual, thanks for reporting bugs and sending in contributions.
Jan 30, 2006
CGDB v0.6.0 was released today, see the download page to try it out. This contains many new fixes and several new features.

CGDB finally has tab completion! I've received countless Emails about this feature, and finally CGDB can provide it. Download the latest version to try it out (and beta test :) ).

Besides tab completion, CGDB now has an official manual. Please check it out here.

The CGDB Team hopes you enjoy the new release. As usual, thanks for reporting bugs and sending in contributions.
Jan 27, 2006
IRC channel #cgdb moved!
I'm moved the #cgdb channel from EFNet to freenode (irc.freenode.net). Again, this is somewhat of an experiment, let's see how it goes.
Nov 15, 2005
IRC channel #cgdb created!
Starting in the next day or so, we'll be idling in #cgdb on EFNet, for anyone who wants to come and talk to us. We won't always be there, but during the day odds are pretty good you'll get one of us to help you. Feel free to come in and ask questions, report bugs, ask for features, or just chat. :)

This is somewhat of an experiment, let's see how it goes.
Nov 10, 2005
I haven't worked on cgdb since my wife sent me a SIGBABY. Hopefully a release will be out before the new year.
Aug 8, 2005
CGDB v0.5.3 was released today, see the download page to try it out. This contains many new fixes and several features.

The configure script now checks the version of readline on the system to ensure that there is a new enough version of readline for CGDB to link against. This could potentially simplify the install process of CGDB.

However, more importantly, CGDB has slightly changed its user interface, even though the change is not backwards compatible. The 't' key in the source window now sets a temporary breakpoint at that line. The 't' key used to put CGDB into insert mode in the TTY window, now 'I' does that. Hopefully this change will not effect to many people. If this change bothers you, please let us know on the cgdb-users mailing list. Marcel Lanz added the temporary breakpoint functionality.

Unfortunately, the "Windows" key would cause CGDB to shut down, this is now fixed. Why does anyone hit that key anyways?

A new feature has been added to CGDB that is very nice. It is the arrowsytle configuration option. CGDB now supports several ways of displaying the current line in CGDB. You can choose short, long or hightlight. The default value is short, which is what you are used to if you have been using CGDB. A longer arrow is available for easier readability. This is my personal favorite. Also, there is the highlight option, which draws no arrow at all. Instead it draws the entire line in inverse video.

The CGDB Team hopes you enjoy the new release. As usual, thanks for reporting bugs and sending in contributions.
May 21, 2005
CGDB v0.5.2 was released today, see the download page to try it out. This contains a very important bug fix for almost every OS except for Linux. CGDB would hang on startup, in an infinite loop while waiting for input from STDIN. This bug has been fixed, and works as far as I can tell. Hopefully I'll have more time to work on CGDB related tasks over the next few months. Please let us know if there are any features you think could be useful in CGDB. Enjoy.
April 2, 2005
CGDB v0.5.1 was released today, see the download page to try it out. This contains many important bug fixes, and it is recommended that you upgrade to the newest version. There have been several fixed bugs that will prevent CGDB from crashing.
Nov 29, 2004
Yes, yes, yes, I know. There has not been a release of CGDB in a long time. I've been so busy that I only have time to fix the bugs that are reported. Hopefully after the holidays I'll have more time to get CGDB up to 1.0. I've been working on GDB and have some small patches that will get CGDB ready to use GDB/MI to make CGDB a much more powerful interface to GDB. I think that everyone will appreciate CGDB even more once this functionality is implemented.

Anyways, if you are interested in helping out with the project, or have any cool feature requests, or just want to say that you enjoy CGDB, let me know ...
July 14, 2004
CGDB v0.5.0 was released today, see the download page to try it out. This contains many important bug fixes, including some that prevent CGDB from crashing When the user would enter many commands, in the time it took GDB to respond to one, CGDB would get confused, and a crash could occur. This is now fixed. Also, there were some silly off by one crashes.

Finally, the reason CGDB is bumped up to .5.0 is because libkui has been successfully implemented. This was 1 out of the 4 libraries that were necessary in order to make CGDB a very usable, configurable curses front end. There is more info below on the four libraries that are going to be developed for CGDB. The new library removes a few keystroke bugs that used to bother me that I could never track down in the old code. Also, in the near future, vim style 'map' commands should be easy to implement. After all, that was one of the whole points of libkui.

Thanks goes out to Michael S. Peek for reporting and fixing several important bugs (especially the crashes). Also, Robert Lemmen is always ensuring a good and speedy package on the great debian distribution.

Enjoy!
May 10, 2004
CGDB v0.4.2 was released today, see the download page to try it out. This is simply a bug fix release that allows CGDB to compile an run on AIX 4.3. Enjoy.
May 6, 2004
Well there is some great news for the CGDB project. It is under development again! The authors of CGDB have come up with 4 crucial pieces that should be designed and implemented in order to make CGDB a robust, usable piece of software.

  • KUI (libkui) This is the "Key User Interface". It is capable of reading in multibyte sequences and either continuing to "match" a sequence, or determine when a sequence failed. In doing this, 2 things are accomplished. CGDB will be able to read in terminal escape sequences (ESC,HOME,..) without a problem. Also, CGDB will get the "map" functionality that vim has. This will be a very powerful feature to easily do many things with just a tap of a button. This library has been designed and implemented, it needs to be alpha tested.
  • WM (libwm) This is the "Windowing Manager". This library is a low level library that is capable of controlling the terminal's screen. This abstracts away all of the windowing functionality like split, vsplit, make window one line larger, ... This library has been mostly designed but needs to be implemented.
  • This library is currently unnamed, it should sit on top of the KUI. It should be capable of determining what "high level" commands the user wants done. So, if the user hits '5C-wk", this library will relize a command was just issued to move the current window up 5 windows. However, if they type a garbage command, it will determine that also, and just pass all the key's to CGDB main loop, as if no command was called.
  • CEX (libcex) This is the "CGDB ex" library. It is basically the core engine of CGDB. This is because this library is capable of recieving any colon command, (such as :next or :step or /lookforstring) and having CGDB execute the command. The colon command can come from either the status bar, or it can come from a startup file or script. This makes CGDB 100% scriptable. This library needs to be designed and implemented.
So, basically, with these 4 libraries in place, a new version of CGDB will be released, that removes us from the old school CGDB implementation. In the long run, this will make CGDB much easier to develop and maintain. Also, CGDB is going to be much more featureful and powerful because of it.
April 26, 2004
CGDB v0.4.1 was released today, see the download page to try it out. This is mostly a bug fix release, although it does have some very interesting bug fixes. Tab completion was fixed, since it didn't work properly in .4.0. Also, a major memory leak was fixed, thanks to an anonymous developer. Finally, CGDB should now compile and run on the HURD system, although I haven't tested it myself. Anyways, download and enjoy.
October 28, 2003
CGDB v0.4.0 was released today, see the download page to try it out. Most of the work done in this release was done to the TGDB library. CGDB has mostly been updated to integrate with TGDB. However, there has been some interesting bug fixes and Mike Mueller added the :set wrapscan option to continue searching at the top of the file when the bottom has wrapped.
August 14, 2003
CGDB v0.3.4 released today, see the download page to try it out. It fixes several bugs including,
  • Fixed libinput bug. If user held down '\n' ( let it get sent many times ) when they hit the next key, '\n' would get sent again. This was a Very frustrating bug.
  • Data at prompt is now cleared when the user hits ^c.
  • After user opened the file dialog, the next time they hit ^c, it would not refresh the prompt.
  • Fix C/C++ highlighting bug, '\"' would screw up the source window.
  • Fixed ada highlighting bug. String literals were not highlighted.
July 16, 2003
CGDB v0.3.3a released today, see the download page to try it out. There was a bug in the file dialog. The user could not select files through it. This release resolves that problem.
July 15, 2003
CGDB v0.3.3 released today, see the download page to try it out. It is mainly a bug fix release. Basically we fixed,
  • CGDB can handle tabs in a file properly. They will line up like vim.
  • Added VI-style page up/page down commands. Depricated old commands.
  • Fixed major bug in ada highlighter. Files were not displayed properly.
June 25, 2003
CGDB v0.3.2 released today, see the download page to try it out. The release is great for us because we got to work more on functionality and ease of use for the user. Some of the great new features added to CGDB are
  • CGDB can automate commands by reading the cgdbrc config file
  • CGDB can parse/highlight 15000+ lines in a fraction of a second
  • CGDB indents tab spaces correctly using the :set tabstop command
  • The user can specify the esc timeout using :set escdelay=milliseconds
  • The user can stop syntax highlighting using :set syntax=off
As the general framework for CGDB grows, adding new functionality will keep getting easier to do. Hopefully you enjoy these features as much as we do!
April 28, 2003
CGDB v0.3.1 released today, see the download page to try it out. This version doesn't have any new functionality. The goal of this release was to re-organize the entire build system. This involved moving the cvs tree around and fixing autoconf/automake problems. In the end, the only program that gets installed now is cgdb. The drivers are kept local in the directory where make is run. Also, cgdb no longer depends on rlctx_prog ( the readline context executable ). This is a big improvement and a step in the right direction for cgdb.
April 11, 2003
CGDB v0.3.0 released today, see the download page to try it out. It contains reliable readline integration and reliable visual breakpoint lines. It is the most stable version yet.
January 30, 2003
CGDB v0.2.3 released today, see the download page to try it out. The switch to the new web site is officially complete today. Hopefully it didn't cause too much confusion. Feel free to report any problems with the new site (contact page).
January 27, 2003
CGDB v0.2.2 was released a few days ago. It contains several important fixes, and we recommend you upgrade to it. Since the interface is beginning to stabilize, we are beginning to focus on robustness. Expect more configurability in future releases.

Revised web page today: Changed the looks to be more pleasing and easy to navigate. Modified descriptions to reflect our focus shift from libtgdb to the CGDB interface.

We were concerned that the TGDB/CGDB naming convention was confusing, so the project is now simply being called CGDB. It is still based on libtgdb, and both are still packaged together. However, most visitors are mainly interested in the curses interface, not developing a new one.

January 14, 2003

CGDB/TGDB 0.2 is out. It has many bug fixes and many new major features. It supports full pseudo terminal semantics to the program being debugged. This means that you can interact with readline, read a char at a time, ... CGDB also supports command line options, limited macro support, previously/next viewing of files, : commands like vi, and several others.

December 9, 2002

Well, The first curses release is up. It has been tested well. Hopefully you will find it as usefull as I do. It is equiped with basic features and is ready for use. Enjoy!

September 15, 2002

Our interfaces are reaching a state where they are quite usable. Most of the known issues have been resolved. A few more features are planned before the first tarball is put on the site. I put up a screenshot of the curses GUI, as well.
August 23, 2002
The project is moving along at a slow pace but quality work has been produced. Since its inception, Bobby took two weeks off and got married! Mueller also took a week off just to stay sane. We hope to have a beta up by the end of September.

July 11, 2002

Initial development... The project was started last week, and significant progress is being made on both the GUI and the wrapper aspect of the code. We expect to have a usable release online in the next few weeks. Stay tuned for updates!

SourceForge.net Logo

©2002, 2003, 2004, 2005 CGDB development team. Valid HTML 4.01!