On Wed, 20 Dec 2006 00:19:26 +0100, Jan Kratochvil wrote: > On Mon, 18 Dec 2006 21:09:19 +0100, Chet Ramey wrote: > ... > > Not exactly. The callback and traditional calling mechanisms are > > orthogonal. It's just not safe to mix them. The longjmp leaves > > readline in an inconsistent state, unless the calling application is > > careful to undo what state-setting it has done. That's the part > > readline can't know about: the appropriate application-specific part. > > OK, so going to provide callback based GDB reimplementation of > gdb_readline_wrapper () (readline () call). Here is one which forks for me but still it is more complicated than I expected. I believe there may be side effects but unfortunately it can be expected the interactive readline(3) usage is not well covered by the testsuite. readline(3) call does a lot of various initializations currently omitted by the callback-based gdb reimplementation. Regards, Jan