unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: gdb-patches@sourceware.org, guile-user@gnu.org
Subject: Re: [PATCH v2 02/13] script language API for GDB: extension.[ch]
Date: Mon, 06 Jan 2014 14:53:47 -0700	[thread overview]
Message-ID: <87r48kkc9g.fsf@fleche.redhat.com> (raw)
In-Reply-To: <87txdklqk4.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 03	Jan 2014 22:10:35 +0100")

>>>>> "Ludovic" == Ludovic Courtès <ludo@gnu.org> writes:

Ludovic> I’m not sure I understand the problem.

Ludovic> What are extension languages typically expected to do when the ‘quit’
Ludovic> flag is set?

The basic idea is that if some extension code is running, then C-c ought
to interrupt that code in the way expected by programmers writing code
in that language.

Python provides a kind of low-level API to its equivalent of Guile's
SCM_TICK and async stuff.  So the approach we took in gdb was to unify
gdb's implementation with Python's, when Python is enabled.  This
ensures that a SIGINT delivery is handled a single time -- by Python if
Python code is running, and by gdb if gdb code is running.

One approach for multiple extension languages might be to notice when
switching languages and move the bit.  However I didn't see any way to
do this in the Guile API.  In Python it can be accomplished with
PyErr_SetInterrupt and PyOS_InterruptOccurred.

Tom


  reply	other threads:[~2014-01-06 21:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <52a7f3e8.e7ed440a.1c58.020f@mx.google.com>
     [not found] ` <87vbyffcwu.fsf@fleche.redhat.com>
2013-12-24 18:05   ` [PATCH v2 02/13] script language API for GDB: extension.[ch] Doug Evans
2014-01-03 21:10     ` Ludovic Courtès
2014-01-06 21:53       ` Tom Tromey [this message]
2014-01-07 13:10         ` Ludovic Courtès
2014-01-07 16:02           ` Tom Tromey
2014-01-07 23:05             ` Ludovic Courtès
2014-01-08  3:17               ` Tom Tromey
2014-01-14 19:17               ` Tom Tromey
2014-01-15 14:52                 ` Ludovic Courtès
2014-01-22  4:21                 ` Mark H Weaver
2014-01-22  4:35                   ` Doug Evans

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=87r48kkc9g.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=guile-user@gnu.org \
    --cc=ludo@gnu.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).