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

_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to