[PATCH 4/4]: Enable readline under "python"

Khoo Yit Phang khooyp@cs.umd.edu
Mon Jul 16 21:04:00 GMT 2012


Hi,

Here's the last Python patch: this enables readline support under "python" using a GDB-specific mechanism, and disables the standard Python readline module.

This is somewhat of a workaround: unfortunately, there is no easy way to make GDB and Python use libreadline without conflicting with each other, since libreadline is configured essentially using global variables. Using the standard Python readline module will lead to strange conflicts, e.g., changing key bindings or tab-completion. I've thought of two possible solutions which are both rather complicated: 1) either reimplement the readline module that carefully swaps configurations between GDB and Python; 2) or run Python's readline in a separate controlling terminal with a proxy readline module in GDB.

Thank you,

Yit
July 16, 2012

-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-enable-readline
Type: application/octet-stream
Size: 6127 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120716/d3e922d9/attachment.obj>


More information about the Gdb-patches mailing list