This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Is readline's SIGINT handler supposed to set quit_flag?
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb at sourceware dot org
- Date: Sun, 6 Nov 2011 22:16:49 +0100
- Subject: Re: Is readline's SIGINT handler supposed to set quit_flag?
- References: <20111106202852.151D1246194@ruffy.mtv.corp.google.com>
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