Improvements to "command script import" to better support reloading in Xcode

Xcode spawns a new LLDB SBDebugger for each debug session, and this was causing the reloading of python modules to fail across debug sessions

(long story short: the module would not be loaded in the current instance of the ScriptInterpreter, but would still be present in sys.modules, hence the import call would just make a copy of it and not run it again
Greg's new decorator uncovered the issue since it relies on actually loading the module's code rather than using __lldb_init_module as the active entity)

This patch introduces the notion of a local vs. global import and crafts an appropriate command to allow reloading to work across debug sessions



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