A hacky debugger UI for hackers
Go to file
snare b678fd1359 Add missing flask_restful dep 2016-01-08 11:12:07 +11:00
examples Update example client for API rewrite 2015-12-31 15:23:09 +11:00
tests Vagrant config for testing on Linux 2015-12-31 00:11:12 +11:00
voltron Basic web UI for API, config, views 2016-01-06 02:09:18 +11:00
.gitignore .DS_Store 2013-10-30 05:16:31 +11:00
LICENSE Finally added a real license because I GUESS 2016-01-01 12:11:40 +11:00
README.md Finally added a real license because I GUESS 2016-01-01 12:11:40 +11:00
dbgentry.py Make shit work on Lunix 2015-12-29 12:34:18 +11:00
setup.py Add missing flask_restful dep 2016-01-08 11:12:07 +11:00

README.md

Voltron

Voltron is an extensible debugger interface written in Python. It allows you to attach utility views to your debugger (LLDB, GDB or VDB) that can retrieve and display data from the debugger host. By running these views in other terminal windows or panes, you can build a customised debugger user interface to suit your needs.

Built-in views are provided for:

  • Registers
  • Disassembly
  • Stack
  • Memory
  • Breakpoints
  • Backtrace

Voltron is built on a JSON/HTTP API which is available over TCP and UNIX domain sockets, and can be used to build custom UI views.

It looks something like this with LLDB:

voltron example LLDB

And this with GDB:

voltron example GDB

Support

voltron is built primarily for LLDB. GDB and VDB are also supported to some extent.

The following architectures are supported:

lldb gdb vdb
x86
x86_64
arm
arm64 x x
powerpc x x

Installation

A standard python setup script is included.

# python setup.py install

This will install the voltron package and the entry point executable wherever that happens on your system.

Quick Start

  1. Configure your debugger to load Voltron when it starts by sourcing the dbgentry.py entry point script. The full path will be inside the voltron package. For example, on OS X it might be /Library/Python/2.7/site-packages/voltron/dbgentry.py.

    For LLDB:

     command script import /path/to/voltron/dbgentry.py
    

    For GDB:

     source /path/to/voltron/dbgentry.py
     voltron init
     set disassembly-flavor intel
    

    This part can go in your .lldbinit or .gdbinit so it's automatically executed when the debugger starts.

    Intel is the only disassembly flavour currently supported for syntax highlighting.

  2. Start your debugger. On LLDB you need to call voltron init after you load the inferior, as a target must be loaded before Voltron's hooks can be installed. This means voltron init cannot be called from .lldbinit the way it can from .gdbinit. Hopefully this will be remedied with a more versatile hooking mechanism in a future version of LLDB (this has been discussed with the developers).

     $ lldb file_to_debug
     (lldb) voltron init
    
  3. In another terminal (I use iTerm panes) start one of the UI views

     $ voltron view register
     $ voltron view stack
     $ voltron view disassembly
     $ voltron view backtrace
     $ voltron view command 'reg read'
    
  4. Set a breakpoint and run your inferior. Once the inferior has started and the debugger has stopped (either because you interrupted it or because it hit a breakpoint) the views will update.

     (*db) b main
     (*db) run
    
  5. The debugger should hit the breakpoint and the views will be updated. A forced update can be triggered with the following command:

     (lldb) voltron stopped
    

Documentation

See the wiki on github.

Bugs

See the issue tracker on github.

License

See the LICENSE file.

If you use this and don't hate it, buy me a beer at a conference some time. This license also extends to other contributors - richo definitely deserves a few beers for his contributions.

Credits

Thanks to Azimuth Security for letting me spend time working on this.

Props to richo for all his contributions to Voltron.

fG!'s gdbinit was the original inspiration for this project.

Thanks to Willi for implementing the VDB support.