From: Pedro Alves <palves@redhat.com>
To: Leonardo Boquillon <leonardo.boquillon@tallertechnologies.com>,
gdb-patches@sourceware.org, tom@tromey.com
Subject: Re: [PING][PATCH] Python: Fix Python error when "Quit"ting a paged info pretty-printers
Date: Tue, 15 Mar 2016 15:45:00 -0000 [thread overview]
Message-ID: <56E82E05.1080209@redhat.com> (raw)
In-Reply-To: <1458046365-21110-1-git-send-email-leonardo.boquillon@tallertechnologies.com>
Hi Leonardo,
On 03/15/2016 12:52 PM, Leonardo Boquillon wrote:
> Right now the "Quit" command used in the output paging is handled as an exception.
> If we issue a "Quit" while outputting the registered pretty-printers list, the
> Python handling layer will catch it and think it's a Python error.
>
> The fix is to check if the error coming from Python is a Quit signal. If it is,
> do not handle it as an error and resume the execution normally.
I'm not sure I fully understand this, but checking the exception
message looks suspicious to me.
It'd help if this had an accompanying testcase, to clearly show what
bug this is fixing, and make sure gdb doesn't regress in future.
We have a few tests under gdb.base/ that test pagination. Maybe
it'd be possible to copy / adjust one of those?
Also, it can't possibly be right to check msg == NULL after
having used that pointer in strncmp:
> + if (strncmp(msg, "Quit", 5))
> + {
> + if (msg == NULL)
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-03-15 15:45 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 [this message]
2016-03-15 17:20 ` Tom Tromey
2016-03-15 17:51 ` Pedro Alves
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=56E82E05.1080209@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