[Lldb-commits] [PATCH] D69793: Bundle libedit-compatible readline replacement

serge via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 4 02:40:50 PST 2019


serge-sans-paille created this revision.
serge-sans-paille added reviewers: labath, JDevlieghere.
serge-sans-paille added a project: LLDB.
Herald added subscribers: lldb-commits, mgorny.

Fix https://bugs.llvm.org/show_bug.cgi?id=43830 while avoiding polluting the global Python namespace.

This both reverts r357277 to rebundle a version of Python's readline module based on libedit.

However, this patch also provides two improvements over the previous implementation:

1. use PyMem_RawMalloc instead of PyMem_Malloc, as expected by PyOS_Readline (prevents to segfault upon exit of interactive session)
2. patch the readline module upon embedded interpreter loading, instead of patching it globally, which should prevent any side effect on other modules/packages


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69793

Files:
  lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
  lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69793.227669.patch
Type: text/x-patch
Size: 5452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191104/bc582f67/attachment-0001.bin>


More information about the lldb-commits mailing list