Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Khoo Yit Phang <khooyp@cs.umd.edu>
Cc: gdb-patches@sourceware.org
Subject: Re: Handle SIGINT in Python
Date: Fri, 20 Jan 2012 21:40:00 -0000	[thread overview]
Message-ID: <m3ehuut5xe.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1FE2845A-162C-48D7-A3D0-C0F2D6DFA09B@cs.umd.edu> (Khoo Yit	Phang's message of "Wed, 11 Jan 2012 16:45:52 -0500")

>>>>> "Yit" == Khoo Yit Phang <khooyp@cs.umd.edu> writes:

Tom> Could we possibly solve this problem without constantly resetting the
Tom> SIGINT handler?  Maybe via a combination of a global flag plus a call
Tom> into Python from handle_sigint?

Yit> It is possible, I just need a way to call PySet_Interrupt. But it
Yit> seems to be that it would require adding hooks to events-top.c and,
Yit> which seems like a separate project.

I think of it more as a different implementation of the feature...

Tom> Our python->gdb exception story is not super.  And, we lose information
Tom> in the round trip.  This might (or might not...) be a prerequisite to
Tom> solving this problem.

Yit> I don't think it's a problem, unless for nested calls to python like
Yit> "py gdb.execute('py ...')".

You can't fully predict what gdb actions will cause Python code to run.

Also, Python frequently calls into gdb.  Any place in gdb that invokes
QUIT could potentially see a C-c.  However, IIUC, with your patch these
QUITs will be inactive if there is Python code up the stack -- but this
means that some slow things in gdb will be uninterruptible.

Tom


  parent reply	other threads:[~2012-01-20 21:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-10 21:31 Khoo Yit Phang
2012-01-10 21:47 ` Doug Evans
2012-01-10 22:09   ` Khoo Yit Phang
2012-01-11 20:59   ` Tom Tromey
2012-01-11 21:06     ` Paul_Koning
2012-01-11 21:23       ` Tom Tromey
2012-01-12  0:54     ` Doug Evans
2012-01-12 15:52       ` Kevin Pouget
2012-01-12 16:48         ` Paul_Koning
2012-01-13 10:55           ` Kevin Pouget
2012-01-13 12:11             ` Paul_Koning
2012-01-10 21:49 ` Tom Tromey
2012-01-11 21:15 ` Tom Tromey
2012-01-11 21:49   ` Khoo Yit Phang
2012-01-11 22:46     ` Khoo Yit Phang
2012-01-20 21:40     ` Tom Tromey [this message]
2012-01-22 16:36       ` Khoo Yit Phang
2012-01-22 20:54         ` Khoo Yit Phang

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=m3ehuut5xe.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=khooyp@cs.umd.edu \
    /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