Hi,
with gdb we've run into a PR (
https://sourceware.org/bugzilla/show_bug.cgi?id=27813 ) where the call
to rl_callback_read_char returns with rl_pending_signal () != 0 after
pressing ^C.
This manifests as two related problems:
- a hang
- during the hang, after doing another keystroke, say a "\n",
it has effect before the ^C. So, say you typed a command and changed
you mind about executing it and press ^C, followed by "\n", the
command will still execute, after which the ^C will take effect.
We fixed this here (
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=faf01aee1d03aef5b6f95fd0db358bf5e70578f9
) like so:
...
rl_callback_read_char ();
+ while (rl_pending_signal () != 0)
+ rl_check_signals ();
...
but rl_check_signals is only available for readline >= 8.0.
So, is this a readline bug?
If not, how are we supposed to fix this in readline < 8.0 (relevant for
distros building gdb against system readline)?
Thanks,
- Tom