summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface/SBCommandInterpreter.i
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2012-09-28 23:57:51 +0000
committerEnrico Granata <egranata@apple.com>2012-09-28 23:57:51 +0000
commit21dfcd9d41a1a325cd373bb0fcc0172400e94f44 (patch)
treee3d6b18d99bbc2ef2f718d52972fff54fc6232a5 /lldb/scripts/Python/interface/SBCommandInterpreter.i
parentb555a767baf4a1058bc6e4e05acbbee9e55d0e26 (diff)
downloadbcm5719-llvm-21dfcd9d41a1a325cd373bb0fcc0172400e94f44.tar.gz
bcm5719-llvm-21dfcd9d41a1a325cd373bb0fcc0172400e94f44.zip
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 llvm-svn: 164865
Diffstat (limited to 'lldb/scripts/Python/interface/SBCommandInterpreter.i')
-rw-r--r--lldb/scripts/Python/interface/SBCommandInterpreter.i3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBCommandInterpreter.i b/lldb/scripts/Python/interface/SBCommandInterpreter.i
index 62aaf8c48aa..4cf3d22f5d0 100644
--- a/lldb/scripts/Python/interface/SBCommandInterpreter.i
+++ b/lldb/scripts/Python/interface/SBCommandInterpreter.i
@@ -101,6 +101,9 @@ public:
lldb::SBProcess
GetProcess ();
+
+ lldb::SBDebugger
+ GetDebugger ();
void
SourceInitFileInHomeDirectory (lldb::SBCommandReturnObject &result);
OpenPOWER on IntegriCloud