Adding Programming Language Support to LLDB
LLDB has been architected to make it straightforward to add support for a programming language. Only a small enum in core LLDB needs to be modified to make LLDB aware of a new programming language. Everything else can be supplied in derived classes that need not even be present in the core LLDB repository. This makes it convenient for developers adding language support either in branches or downstream repositories since it practically eliminates the potential for merge conflicts.
The basic steps needed are as follows:
- Add the language to the LanguageType enum
- Add a TypeSystem for the language
- Add expression evaluation support
Additionally, you may want to create a Language and LanguageRuntime plugin for your language, which enables support for advanced features like dynamic typing and data formatting.