Issue |
151617
|
Summary |
Make LLDB compatible with the Python Limited C API
|
Labels |
metaissue,
lldb
|
Assignees |
|
Reporter |
JDevlieghere
|
Currently, LLDB uses the Python private or unstable API. This [means](https://lldb.llvm.org/resources/caveats.html#python) that LLDB only works with the exact same version of Python that LLDB was compiled with. See https://docs.python.org/3/c-api/stable.html for more details.
Previously, we were limited by SWIG, which generated code that wasn't part of the limited API. As of [version 4.2](https://www.swig.org/Release/CHANGES), SWIG generates code that's compatible with the Python 3.4 stable API and later.
Currently, the minimum Python version is 3.8. Based on a quick attempt to define `Py_LIMITED_API` to `0x03080000`, we'll need to find replacements for the following identifiers:
- `_Py_IsFinalizing`
- `_PyObject_Dump`
- `Py_buffer`
- `PyBUF_READ`
- `PyBUF_SIMPLE`
- `PyBytes_AS_STRING`
- `PyGILState_Check`
- `PyList_GET_SIZE`
- `PyRun_SimpleString`
- `PyRun_String`
- `PyTuple_GET_SIZE`
- `PyUnicode_AsUTF8AndSize`
This issue tracks the work to migrate over to only using the limited C API in LLDB.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs