gdbgui v0.13.1.1 released: Browser-based frontend to gnu debugger

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.

Changelog v0.13.1.1

  • update docs and add __main__ entrypoint
  • Remove automatic flushing of stdout and require a newer version of pygdbmi
  • Add flake8 tests to CI build

Install

git clone https://github.com/cs01/gdbgui.git
cd gdbgui
python setup.py install

Usage

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 -g flag.
  • Click 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 -g flag 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.

gdbgui [-h] [-p PORT] [--host HOST] [-r] [-g GDB] [--rr] [--lldb] [-v]
              [--hide_gdbgui_upgrades] [--debug] [-n] [-x GDB_CMD_FILE]
              [--args ARGS [ARGS ...]] [--auth] [--auth-file AUTH_FILE]
              [--license LICENSE] [--key KEY] [--cert CERT]
              [--project PROJECT]
              [cmd [cmd ...]]

A server that provides a graphical user interface to the gnu debugger (gdb).
https://github.com/cs01/gdbgui

positional arguments:
  cmd                   (Optional) The binary and arguments to run in gdb.
                        This is a way to script the intial loading of the
                        inferior binary you wish to debug. For example gdbgui
                        './mybinary myarg -flag1 -flag2'

optional arguments:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  The port on which gdbgui will be hosted. Defaults to
                        5000
  --host HOST           The host ip address on which gdbgui serve. Defaults to
                        127.0.0.1
  -r, --remote          Shortcut to sets host to 0.0.0.0 and suppress browser
                        from opening. This allows remote access to gdbgui and
                        is useful when running on a remote machine that you
                        want to view/debug from your local browser, or let
                        someone else debug your application remotely.
  -g GDB, --gdb GDB     Path to gdb or lldb executable. Defaults to gdb. lldb
                        support is experimental.
  --rr                  Use `rr replay` instead of gdb. Replays last recording
                        by default. Replay arbitrary recording by passing
                        recorded directory as an argument. i.e. gdbgui
                        /recorded/dir --rr. See http://rr-project.org/.
  --lldb                Use lldb commands (experimental)
  -v, --version         Print version
  --hide_gdbgui_upgrades
                        Hide messages regarding newer version of gdbgui.
                        Defaults to False.
  --debug               The debug flag of this Flask application. Pass this
                        flag when debugging gdbgui itself to automatically
                        reload the server when changes are detected
  -n, --no_browser      By default, the browser will open with gdb gui. Pass
                        this flag so the browser does not open.
  -x GDB_CMD_FILE, --gdb_cmd_file GDB_CMD_FILE
                        Execute GDB commands from file.
  --args ARGS [ARGS ...]
                        (Optional) The binary and arguments to run in gdb.
                        Example: gdbgui --args "./mybinary myarg -flag1
                        -flag2"
  --auth                (Optional) Require authentication before accessing
                        gdbgui in the browser. Prompt will be displayed in
                        terminal asking for username and password before
                        running server.
  --auth-file AUTH_FILE
                        (Optional) Require authentication before accessing
                        gdbgui in the browser. Specify a file that contains
                        the HTTP Basic auth username and password separate by
                        newline. NOTE: https is enabled by provided an ssl and
                        certificate
  --license LICENSE     (Optional) Store gdbgui premium license key.
  --key KEY             SSL private key. Generate with:openssl req -newkey
                        rsa:2048 -nodes -keyout host.key -x509 -days 365 -out
                        host.cert
  --cert CERT           SSL certificate. Generate with:openssl req -newkey
                        rsa:2048 -nodes -keyout host.key -x509 -days 365 -out
                        host.cert
  --project PROJECT     Set the project directory. When viewing the "folders"
                        pane, paths are shown relative to this directory.

Tutorial

Copyright (C) 2017 Chad Smith

Source: https://github.com/cs01/

Share