Skip to main content

browser-based gdb frontend using Flask and JavaScript to visually debug C, C++, Go, or Rust

Project description

gdbgui
https://travis-ci.org/cs01/gdbgui.svg?branch=master https://img.shields.io/badge/pypi-v0.7.3.7-blue.svg https://img.shields.io/badge/python-2.7,3.3,3.4,3.5,pypy-blue.svg https://img.shields.io/badge/SayThanks.io-☼-blue.svg https://img.shields.io/gratipay/cs01.svg

A modern, browser-based frontend to gdb (gnu debugger). Add breakpoints, view stack traces, and more in C, C++, Go, and Rust! Simply run gdbgui from the terminal and a new tab will open in your browser.

Install

pip install gdbgui --upgrade

Run

gdbgui

A new tab in your browser will open with gdbgui in it.

To immediately set the inferior binary and arguments and have them load when the page is loaded

gdbgui --cmd '/path/to/binary -arg myaarg -flag'

Help

gdbgui -h displays command line options, such as changing the port or host ip.

Compatibility

gdbgui has been tested to work in these environments. It may work in other environments as well.

Python versions: 2.7, 3.3, 3.4, 3.5, pypy

Operating systems: Ubuntu 16.04

Browsers: Chrome, Firefox, Ubuntu Web Browser

Development

Contributions and bug fixes are welcome!

gdbgui was designed to be easily hackable and extendable. There is no build system necessary to run or develop this app.

There are three parts to gdb:

  1. gdbgui.js: There is just one JavaScript file, and that file contains the majority of the app itself. It sends AJAX requests to interact with gdb, then gets the response and updates the DOM as necessary.

  2. gdbgui.jade: HTML file that defines the frontend (Note: Jade/Pug is a more concise form of html. Also note: jade has been renamed to pug, but the Python pypi package still maintains the jade name. See demo here.)

  3. backend.py: The backend consists of a single Python file, which makes use of pygdbmi to interact with a gdb subprocess, and Flask to set up url routing and responses.

To get started with development, set up a new virtual environment, then run

git clone https://github.com/cs01/gdbgui
cd gdbgui
pip install -r gdbgui/requirements.txt
python -m gdbgui/backend.py --debug

Testing

python setup.py test runs unit tests located in gdbgui/tests/test_app.py. Add new tests there as necessary.

Future Improvements

  • Hover over a variable in source code to see its value

  • Embed plotting tools to plot a variable’s value over time

  • Assign values to variables / memory addresses

  • Embed a binary/decimal/hex calculator

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gdbgui-0.7.3.7.tar.gz (288.1 kB view details)

Uploaded Source

File details

Details for the file gdbgui-0.7.3.7.tar.gz.

File metadata

  • Download URL: gdbgui-0.7.3.7.tar.gz
  • Upload date:
  • Size: 288.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gdbgui-0.7.3.7.tar.gz
Algorithm Hash digest
SHA256 8efac9ef3aecfc1f4c9887f3089f95a722f90819a715c46270168787e78dd5e8
MD5 543e53464eb51299159afc491b9a9779
BLAKE2b-256 7bb1673c9908c010b21ec429bef7e2c51ad04a119102cd5642653163a2bae093

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page