gdbgui/README.md

78 lines
3 KiB
Markdown
Raw Normal View History

2016-09-26 07:34:30 +02:00
[![Build Status](https://travis-ci.org/cs01/gdbgui.svg?branch=master)](https://travis-ci.org/cs01/gdbgui)
2017-01-03 22:29:37 +01:00
# A browser-based frontend/gui for GDB.
Add breakpoints, view sourcecode, stack traces, registers, disassembly, and more. Easily hackable single page of es6 JavaScript and jquery, with python managing a gdb subprocess on the backend (see [pygdbmi](https://github.com/cs01/pygdbmi)).
2017-01-03 22:29:37 +01:00
Made with a lightweight Python server (Flask), and JavaScript for the frontend. Simply run the server, view the page, and start debuggin'!
2016-09-26 07:34:30 +02:00
2016-12-22 01:26:14 +01:00
![gdbgui](https://github.com/cs01/gdbgui/blob/master/gdbgui.png)
2017-01-03 22:29:37 +01:00
## Install
pip install gdbgui
2017-01-03 22:29:37 +01:00
## Run
python -m gdbgui.backend
2016-09-26 07:34:30 +02:00
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
2017-01-03 22:29:37 +01:00
Open [http://127.0.0.1:5000/](http://127.0.0.1:5000/) in a browser and enjoy!
2016-09-26 07:34:30 +02:00
## Compatibility
2017-01-04 03:53:48 +01:00
Python versions: 2.7, 3.3, 3.4, 3.5, pypy
2017-01-04 03:53:48 +01:00
Operating systems: Ubuntu 16.04
2017-01-03 22:29:37 +01:00
2017-01-04 03:53:48 +01:00
Browsers: Chrome
2017-01-03 22:29:37 +01:00
## Development
`gdbgui` was designed to be easily hackable and extendtable.
2017-01-04 03:53:48 +01:00
There are only three parts to gdb:
2017-01-03 22:29:37 +01:00
2017-01-04 03:53:48 +01:00
1. `gdbgui.js`: There is only a single 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.
2017-01-03 22:29:37 +01:00
2017-01-04 03:53:48 +01:00
1. `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](https://github.com/pugjs/pug), but the Python pypi package still maintains the jade name.)
1. `backend.py`: The backend consists of a single Python file, which makes use of [pygdbmi](https://github.com/cs01/pygdbmi) to interact with a gdb subprocess, and [Flask](http://flask.pocoo.org/) to set up url routing and responses.
2017-01-03 22:29:37 +01:00
To get started with development, set up a new virtual environment, then run
git clone https://github.com/cs01/gdbgui
pip install -r gdbgui/requirements.txt
python -m gdbgui.backend --debug
2017-01-04 03:53:48 +01:00
### Testing
2017-01-03 22:29:37 +01:00
Test changes are still working with `python setup.py test`. Add to tests at gdbgui/tests/test_app.py
## Contributing
Contributions and bug fixes are welcome!
## Credits
Inspiration was drawn from the following projects
* [sirnewton01 / godbg](https://github.com/sirnewton01/godbg)
* [cyrus-and / gdb](https://github.com/cyrus-and/gdb)
## TODO
Despite this list, gdbgui is quite usable in its current form
* escape brackets on system <includes> so they don't disappear
* allow argument passing to the inferior process being debugged
* add button to widen windows
* add clear button to windows
* add links back to github, etc
* improve toolbar styling, change color when error occurs
* add preference ui elements (auto-refresh various windows after command is sent; show/hide windows as desired)
* make flash of color fade out when snapping to source code lines or restoring old history
2017-01-03 22:29:37 +01:00
* add autocompletion and documentation of all commands
* add ability to view/inspect variables
* add ability to view/inspect memory
* only make gutter create/delete breakpoints, not anywhere in source file