bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] multiple instances of readline


From: Pedro Alves
Subject: [Bug-readline] multiple instances of readline
Date: Sat, 01 Nov 2014 15:27:31 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

Hey there,

I'm pondering how to make GDB have multiple open command line
consoles simultaneously, each with its own history, with fully
functional GDB command completion, etc.

Was there ever any attempt at making it possible to have multiple
instances of readline in the same process?

Swapping readline's globals with rl_save_state / rl_restore_state
sounds like a promising (even if not the cleanest) approach.  I'm
wondering whether others have used these functions for this.

GDB uses readline's callback/alternate interface.  I'd
likely make GDB keep a map of input descriptors to readline's
struct readline_state object's, and have GDB swap to the correct
instance before calling into readline.  I'd probably also need
rl_catch_signals=0.

Searching in google and Debian's Code Search, I can't seem to
find _any_ user of rl_save_state/rl_restore_state though.
Can anyone point at who are the known users?

Or, at any other approaches?

Thanks,
Pedro Alves



reply via email to

[Prev in Thread] Current Thread [Next in Thread]