hanchenye-llvm-project/lldb/source/Host/common
Enrico Granata 21dfcd9d41 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
2012-09-28 23:57:51 +00:00
..
Condition.cpp Don't expose the pthread_mutex_t underlying the Mutex & Mutex::Locker classes. 2012-05-04 23:02:50 +00:00
DynamicLibrary.cpp Implementing plugins that provide commands. 2012-09-28 23:57:51 +00:00
File.cpp OptionValueFileSpec had an accessor to read the contents of the file and return the data. This can end up being used to get the string contents of a text file and could end up not being NULL terminated. I added accessors to get the file contents raw, or with a null terminator. Added the needed calls to make this happen in the FileSpec and File classes. 2012-08-30 18:15:10 +00:00
FileSpec.cpp OptionValueFileSpec had an accessor to read the contents of the file and return the data. This can end up being used to get the string contents of a text file and could end up not being NULL terminated. I added accessors to get the file contents raw, or with a null terminator. Added the needed calls to make this happen in the FileSpec and File classes. 2012-08-30 18:15:10 +00:00
Host.cpp Added the ability to download a symboled executable and symbol file given a UUID. 2012-09-27 03:13:55 +00:00
Makefile
Mutex.cpp Fixed errors and warnings on debug code. 2012-07-09 13:34:19 +00:00
SocketAddress.cpp Add support for platforms without sa_len to SocketAddress, and modify 2011-07-22 19:12:42 +00:00
Symbols.cpp Added the ability to download a symboled executable and symbol file given a UUID. 2012-09-27 03:13:55 +00:00
Terminal.cpp Ran the static analyzer on the codebase and found a few things. 2012-07-17 03:23:13 +00:00
TimeValue.cpp Fix a integer trauction issue - calculating the current time in 2012-04-07 04:55:02 +00:00