This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is readline's SIGINT handler supposed to set quit_flag?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]