public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb@sourceware.org
Subject: Re: Is readline's SIGINT handler supposed to set quit_flag?
Date: Sun, 06 Nov 2011 21:17:00 -0000	[thread overview]
Message-ID: <20111106211648.GA19044@host1.jankratochvil.net> (raw)
In-Reply-To: <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

      reply	other threads:[~2011-11-06 21:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 20:29 Doug Evans
2011-11-06 21:17 ` Jan Kratochvil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111106211648.GA19044@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=dje@google.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).