This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/4]: Enable readline under "python"
- From: Tom Tromey <tromey at redhat dot com>
- To: Khoo Yit Phang <khooyp at cs dot umd dot edu>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 25 Jul 2012 11:38:16 -0600
- Subject: Re: [PATCH 4/4]: Enable readline under "python"
- References: <A7A972B1-3B6B-4A99-BB64-6CC32C7FE448@cs.umd.edu>
>>>>> "Yit" == Khoo Yit Phang <khooyp@cs.umd.edu> writes:
Yit> 1) either reimplement the readline module that carefully swaps
Yit> configurations between GDB and Python; 2) or run Python's readline in
Yit> a separate controlling terminal with a proxy readline module in GDB.
#2 seems extremely hard.
Maybe #1 is possible, I don't know.
Yit> 2012-07-16 Khoo Yit Phang <khooyp@cs.umd.edu>
Yit> Enable readline in Python in a GDB-specific way and block the
Yit> standard Python readline module to prevent conflicts with GDB.
Yit> * Makefile.in (SUBDIR_PYTHON_OBS): Add py-gdb-readline.o.
Yit> (SUBDIR_PYTHON_SRCS): Add python/py-gdb-readline.c.
Yit> (py-gdb-readline.o): Add rule to compile python/py-gdb-readline.c.
Yit> * python/py-gdb-readline.c: New file.
Yit> * python/python-internal.h (gdbpy_initialize_gdb_readline): New
Yit> prototype.
Yit> * python/python.c (_initialize_python): Call
Yit> gdbpy_initialize_gdb_readline.
This one is ok; but of course it depends on an earlier patch so it can't
go in until that is resolved.
Tom