<rdar://problem/11558812>

Allow command script import to load packages.

e.g.:
egranata$ ./lldb
(lldb) command script import lldb.macosx.crashlog
"crashlog" and "save_crashlog" command installed, use the "--help" option for detailed help
"malloc_info", "ptr_refs", "cstr_refs", and "objc_refs" commands have been installed, use the "--help" options on these commands for detailed help.
The "unwind-diagnose" command has been installed, type "help unwind-diagnose" for detailed help.
(lldb) 

./lldb
(lldb) command script import theFoo
I am happy
(lldb) fbc
àèìòù
(lldb)

egranata$ ls theFoo/
__init__.py theBar.py

egranata$ cat theFoo/__init__.py 
import lldb
import theBar

def __lldb_init_module(debugger, internal_dict):
	print "I am happy"
	debugger.HandleCommand("command script add -f theFoo.theBar.theCommand fbc")
	return None

egranata$ cat theFoo/theBar.py 
#encoding=utf-8

def theCommand(debugger, command, result, internal_dict):
	result.PutCString(u"àèìòù")
	return None



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180975 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed