In a previous post I described how to build views for Voltron. In this short binary option robot results from super I’ll cover building command plugins for Voltron.
The debugger hosts supported by Voltron each provide a method of adding user-defined commands to the debugger CLI. The invoke method is called when the command is invoked in the debugger. This is the plugin class that is registered in Voltron’s plugin registry. Run `voltron init` after you load a target. A simple register list command Now for an example that uses the debugger host adaptor API. This interface isn’t documented yet, but the main methods map one-to-one with the methods defined in the JSON API reference.
You can see the invoke method there calls voltron. It’s installed the same way as the previous examples. Have a look at the debugger adaptor plugins for the methods you can use in a command plugin in order to be supported cross-debugger host. In 2013 I released a small debugger UI tool called Voltron.
In the last few months I completely rewrote the guts of it to be much more extensible, and gave a short talk at Kiwicon 8 on it, so I figured it was about time for an update. This post will take you through building new Voltron views for your own purposes. Some of the information in this blog post is covered in the documentation on the wiki. Note: I’m using LLDB in this post, but you can use GDB and it will be much the same.
Poking around in the REPL Whenever I write Python I spend a lot of time poking around in classes in a REPL, often in lieu of actually consulting the documentation, so that seems like a good place to start. First off let’s fire up LLDB with an inferior, initialise Voltron, set a breakpoint and run the executable so we have some useful debugger state to poke at. I’m using the test inferior from the Voltron package, but use whatever. In this example we’ve queried the state of the debugger and can see that the request was successful, and that the debugger is stopped.