From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>,
Leonardo Boquillon
<leonardo.boquillon@tallertechnologies.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PING][PATCH] Python: Fix Python error when "Quit"ting a paged info pretty-printers
Date: Tue, 15 Mar 2016 17:51:00 -0000 [thread overview]
Message-ID: <56E84B87.5020100@redhat.com> (raw)
In-Reply-To: <87bn6flkt9.fsf@tromey.com>
On 03/15/2016 05:20 PM, Tom Tromey wrote:
> Leonardo> Right now the "Quit" command used in the output paging is
> Leonardo> handled as an exception. If we issue a "Quit" while
> Leonardo> outputting the registered pretty-printers list, the Python
> Leonardo> handling layer will catch it and think it's a Python error.
>
> Leonardo> The fix is to check if the error coming from Python is a Quit
> Leonardo> signal. If it is, do not handle it as an error and resume the
> Leonardo> execution normally.
>
> I think a quit should be turned into a PyExc_KeyboardInterrupt. So it
> would make sense, IMO, to turn a PyExc_KeyboardInterrupt back into a
> RETURN_QUIT in py-cmd.c.
That makes sense to me. We already do something like that, in
set_active_ext_lang / restore_active_ext_lang, actually.
(
I happen to be working on getting rid of immediate_quit, for
C++ conversion, and a good part of that is about not losing
Ctrl-C's, ever, so that feels quite apropos:
https://github.com/palves/gdb/commits/palves/immediate_quit
)
Thanks,
Pedro Alves
prev parent reply other threads:[~2016-03-15 17:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 12:53 Leonardo Boquillon
2016-03-15 15:45 ` Pedro Alves
2016-03-15 17:20 ` Tom Tromey
2016-03-15 17:51 ` Pedro Alves [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=56E84B87.5020100@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=leonardo.boquillon@tallertechnologies.com \
--cc=tom@tromey.com \
/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