Articles in this series
The Machine Interface (MI) Driver is a standalone executable that sits between a client IDE (a GUI debugger for example) and a debugging API (LLDB), translating MI commands into equivalent LLDB actions. It also listens to events from the debugger such as “hit a breakpoint” and translates the event into an appropriate MI response for the client to interpret. This allows IDEs that would normally drive the GNU Debugger (GDB), or other back ends that understand the MI commands, to work with LLDB, with very similar functionality.
The MI Driver was designed to work on the following OS platforms:
- Mac OS X
Written in C++ and using the C++11 Standard Template Library, the MI Driver is a multi-threaded application available to other platforms, using an appropriate compiler. It was developed for one of Codeplay's clients and kindly released to the LLVM community under the University of Illinois Open Source License.
2 The LLVM Community
At the time of writing this blog, the MI Driver implements the most commonly used MI commands, but does not yet cover all of the commands in the MI specification. Therefore, it may not work correctly with MI clients that are using commands, arguments, or options that are not yet implemented. Hence, the code has been released to the community so that it may become more robust in its use with other clients.
3 The Aim of This Blog Series
The aim of this blog series is to provide an insight into various aspects of the MI Driver so that it is better understood, should anyone want to implement more features or make improvements to it.
4 Source Code Location and Latest Updates
The source code for the MI Driver can be found in the tools/lldb-mi directory, within the LLDB repository. See the MIReadMe.txt in the repository for the currently implemented set of MI commands and a list of improvements that have been made.
Using the MI Driver command line arguments "–interpreter –help" together will print out help.
This blog post, the first in a series of posts on the MI Driver, has provided a basic introduction. For more information on usage, the design, and the implementation, see the subsequent posts in this series: