gdb (gnu debugger) allows you to see what is going on ‘inside’ another program while it executes — or what another program was doing at the moment it crashed. It is widely distributed and used but is terminal-based which does not always let you get a full picture of what the program is doing without looking up lots of commands.
gdbgui (gdb GUI, or Graphical User Interface, pronounced gee-dee-bee goo-ee) utilizes gdb to build a frontend based off of all the amazing things gdb can do. gdbgui is powerful, easy to use, supplement to gdb. It is open source and free.
- Exclude “tests” directory from Python package
git clone https://github.com/cs01/gdbgui.git
python setup.py install
A new tab in your browser will open with gdbgui in it. If a browser tab did not open, navigate to the ip/port that gdbgui is being served on (i.e. http://localhost:5000).
Now that gdbgui is open, you can interactively run a program with it.
- Type the path to the executable in the input at the top (next to “Load Binary”). The executable should already exist and have been compiled with the
Load Binary. The program and symbols will load, but will not begin running. A breakpoint will be added to main automatically. This can be changed in settings if you prefer not to do this.
- The line of source code corresponding to main will display if the program was compiled with the
-gflag debug symbols.
- Click the Run button, which is on the top right and looks like a circular arrow.
- Step through the program by clicking the Next, Step, Continue, icons as desired. These are also on the top right.
For a list of gdbgui arguments, see the Arguments section below or type gdbgui –help.
Copyright (C) 2017 Chad Smith