History log of /external/lldb/examples/plugins/commands/fooplugin.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
08f7fffad31287d960d1a5daf0f7de636672ff43 30-Oct-2012 Enrico Granata <egranata@apple.com> Replace printf with result.Printf, so that the plugin shows its output with any configuration of the LLDB I/O streams (esp. useful in graphic environments such as Xcode)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/examples/plugins/commands/fooplugin.cpp
ad7643907dc6d5298b9eaf7cfd05181cd815dd26 23-Oct-2012 Enrico Granata <egranata@apple.com> Proper copyright notice

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/examples/plugins/commands/fooplugin.cpp
6d101887bb427b3c879c0c06775ab4dcb1cd265b 29-Sep-2012 Enrico Granata <egranata@apple.com> Implementing plugins that provide commands.
This checkin adds the capability for LLDB to load plugins from external dylibs that can provide new commands
It exports an SBCommand class from the public API layer, and a new SBCommandPluginInterface

There is a minimal load-only plugin manager built into the debugger, which can be accessed via Debugger::LoadPlugin.

Plugins are loaded from two locations at debugger startup (LLDB.framework/Resources/PlugIns and ~/Library/Application Support/LLDB/PlugIns) and more can be (re)loaded via the "plugin load" command

For an example of how to make a plugin, refer to the fooplugin.cpp file in examples/plugins/commands

Caveats:
Currently, the new API objects and features are not exposed via Python.
The new commands can only be "parsed" (i.e. not raw) and get their command line via a char** parameter (we do not expose our internal Args object)
There is no unloading feature, which can potentially lead to leaks if you overwrite the commands by reloading the same or different plugins
There is no API exposed for option parsing, which means you may need to use getopt or roll-your-own


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/examples/plugins/commands/fooplugin.cpp