Patch to disable the python script interpreter but still compile the swig bindings

Hi,

Attached is a patch to disable only the internal python interpreter, but still compiling the python bindings.

If LLDB_DISABLE_PYTHON is defined, the python script interpreter isn't compiled, but swig is run and the python bindings are compiled.
If both LLDB_DISABLE_PYTHON and LLDB_DISABLE_PYTHON_BINDINGS are defined, neither the script interpreter, nor the swig bindings are compiled.

That way, we have a finer control over what parts get compiled and it's easier to debug programs that embed lldb (either python programs or C/C++ programs that embed a python interpreter.

From the code, it seemed to me that the GIL-locking code isn't perfectly capable of handling a python program that calls asynchronously into lldb (with the python script interpreter activated).

I'm now perfecting my python front-end and will link into lldb's script interpreter code afterwards. I need to debug it further.

Regards,

  Filipe

lldb-disable-python-interpreter.patch (9.89 KB)

Hi,

I missed a file (scripts/Python/python-extensions.swig) when executing svn diff. Attached is the correct diff.

Regards,

  Filipe

lldb-disable-python-interpreter.patch (10.6 KB)