Is readline's SIGINT handler supposed to set quit_flag?

Jan Kratochvil jan.kratochvil@redhat.com
Sun Nov 6 21:17:00 GMT 2011


On Sun, 06 Nov 2011 21:28:51 +0100, Doug Evans wrote:
> Or is ^c when in readline not intended to invoke the QUIT machinery?

I find it working in general.  The idea is that:

GDB has handle_sigint installed which sets QUIT_FLAG.

readline has _rl_handle_signal installed which will do some readline cleanups
and call also rl_cleanup_after_signal which restores back the SIGINT handler
to GDB and rethrows the SIGINT signal, so that GBD catches it.

readline also aborts some completion operations it does thanks to the work
_rl_handle_signal does.

Offtopic here is that various functions are called from that signal handler
which are not signal-safe in POSIX and sometimes really crash GDB.


> (gdb) b functi<tab><^c>
> 
> Is that ^c intended to terminate all the symbol completion machinery?

It works for me, for

(gdb) b f<tab><^c>

FSF GDB HEAD aborts for me leaving on screen:
(gdb) b fQuit
(gdb) _


Regards,
Jan



More information about the Gdb mailing list