Frequently Asked Questions
- What is CGDB?
- Where can I get CGDB?
- What platforms does CGDB support?
- When will feature X be added?
- Will CGDB be packaged with my favorite Linux distribution?
- What versions of GDB are supported?
- Who uses CGDB?
- How do I automate colon commands using the cgdbrc file?
- Why do some keys not work properly for me in CGDB?
- Why does CGDB not work when a tty can not be opened?
What is CGDB?
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.
Where can I get CGDB?
The CGDB project is hosted on http://sourceforge.net/. You can view the project by going to http://sourceforge.net/projects/cgdb/. Alternatively, CGDB's home-page is at http://cgdb.sourceforge.net/. If you would like to download CGDB, please click on the download link to the left.
What platforms does CGDB support?
CGDB is used daily on Linux, Solaris and Cygwin (WinNT, 2000, and XP). It has been reported to work on AIX, FreeBSD, HURD and Mac OS X.
When will feature X be added?
Great question. We're not sure.
Will CGDB be packaged with my favorite Linux distribution?
Currently CGDB is available on Debian, Gentoo, and Mac OS X. See the download page for more details. If you would like to see a package for a different distribution, you are welcome to make one. :)
What versions of GDB are supported?
This is an area where CGDB shines -- CGDB has been tested successfully on versions of GDB as old as 4.17 (Gnat's patched GDB). It supports all recent releases up to the current 6.4. We will continue to test it to ensure it continues to support the latest GDB. Unlike some frontends, CGDB does not require a patched GDB, or a special version of any kind.
Who uses CGDB?
We're excited to see that many people are catching onto the project even in its current immature state. We've been contacted by people worldwide (US, France, Germany, Poland, India, China, Japan) about it! We hope that it can become the de facto text GDB front end, at least for Vim fans. :) (Emacs users can check into the TUI, which is a compile-time option that can be build into GDB.)
How do I automate colon commands using the cgdbrc file?
CGDB looks at the file $HOME/.cgdb/cgdbrc. It executes each of the lines in that file in order as if they were typed into the status bar. This is a very useful way of automating commands.
Why do some keys not work properly for me in CGDB?
CGDB is proud of its custom key input library. This is because it *can* use the ESC key, without having problems understanding escape sequences that are generated when certain keys are hit. Some of the keys that generate escape sequences are the arrow keys, page up, page down, insert, delete, home, end and all the function keys.
If you have problems using any of the keys above, you should modify the value of escdelay. Please look at the README file for more information on escdelay.
Why does CGDB not work when a tty can not be opened?
There are 2 problems with this.
-
The annotate 2 communication protocol used between CGDB and GDB is lacking. It is difficult (at best) to figure out which output is GDB and which output is the inferior program. It is impossible to send input to the inferior program without error.
To solve this CGDB used the tty command to be able to allow the user to send data to the inferior program. It also can easily determine which data is from the inferior and which data is from GDB.
-
Readline can not be used if there is no tty available.
All in all, not allowing CGDB to work when there is no tty is a bug. In the future, when CGDB will work when no tty is available, there will be several features that do not work:
- No sending input to the inferior program. The workaround is to start the program from the terminal and attach to it using GDB.
- Readline will not work.