Is there any interactive or more user-friendly version (or substitution) of GDB for debugging?
Some people suggested CGDB, but after a few tests I found it buggy and unstable.
Is there any interactive or more user-friendly version (or substitution) of GDB for debugging?
Some people suggested CGDB, but after a few tests I found it buggy and unstable.
There are multiple graphical frontends for gdb. GNU DDD and KGDB to mention a couple.
GNU DDD:
KGDB:
Update: I failed to mention that gdb actually has a built in text-based user interface if you run it with
gdb -tui
:GDB Dashboard
https://github.com/cyrus-and/gdb-dashboard
GDB dashboard uses the official GDB Python API and prints the information that you want when GDB stops e.g. after a
next
, like the nativedisplay
command.Vs TUI:
more robust, as it just prints to stdout instead of putting the shell on a more magic curses state, e.g.:
vi
mode in.inputrc
causes problems: https://superuser.com/questions/180512/how-to-turn-off-gdb-tui/927728#927728highly configurable from Python: you can select what you want to output and how big each section is depending on what you are debugging.
The most useful views are already implemented: source, assembly, registers, stack, memory, threads, expressions... but it should be easy to extend it with any information that is exposed on the GDB Python API.
TUI only allows showing two of source, assembly and registers and that is it. Unless you want to modify it's C source code of course ;-)
I believe that GDB should ship with a setup like that out of the box and turned on by default, it would attract much more users that way.
Oh, and the main developer, Andrea Cardaci, has been very responsive and awesome. Big kudos.
See also: https://stackoverflow.com/questions/209534/how-to-highlight-and-color-gdb-output-during-interactive-debugging/17341335#17341335
There's a list of gdb frontends at http://sourceware.org/gdb/wiki/GDB%20Front%20Ends
This unfortunately gives only further links, but no hints about scope and usability which varies a lot there. I'd recommend to use a frontend that is in active development as gdb itself changes a lot.
You can use GDBFrontend: https://github.com/rohanrhu/gdb-frontend. You can install it with the following commands:
Usage video: https://www.youtube.com/watch?v=z44KJDYZOoE
You can try UltraGDB, it is a GDB GUI frontend and lightweight IDE based on Eclipse technology.