GDB dashboard: debug info at a glance

GDB dashboard is a useful python utility for programmers to show valuable information while debugging with gdb. It uses the gdb python interface of gdb and implements several modules in different categories to show debug information:

  • assembly: disassembled code
  • expressions: watches user expressions
  • history: last entries in gdb value history
  • memory: inspect contiguous memory locations
  • registers
  • source (if available)
  • stack: current stack trace
  • threads

All the modules are enabled by default.

Features

  • Single GDB init file
  • Interaction with GDB using the native Python API
  • Several default modules are included to address the most basic needs: source code, assembly, registers, etc.)
  • User-defined modules can be easily developed by extending a Python class
  • Additional configuration files (both GDB and Python) are read from ~/.gdbinit.d/
  • Fully stylable user interface and dynamic command prompt
  • No GDB command has been redefined, instead all the features are available as subcommands of the main dashboard command

Installation

Clone the GutHub repo and copy the file in your home directory:

$ git clone https://github.com/cyrus-and/gdb-dashboard
$ cp gdb-dashboard/.gdbinit ~/

Usage

GDB dashboard is loaded when gdb is invoked, thanks to the ~/.gdbinit file. The dashboard can be shown whenever the program stops. By default it is turned off. Use the following command within gdb to change the behaviour:

>>> dashboard -enabled [on|off]

To show the dashboard:

>>> dashboard

To change the layout, e.g., show only assembly, expressions and registers and disable source, run:

>>> dashboard -layout assembly expressions registers !source

As you can understand, it’s very simple to extend this framework. For more information, hit the project page.

On GitHub: GDB dashboard

One thought on “GDB dashboard: debug info at a glance”

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s