guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 02/13] script language API for GDB: extension.[ch]


From: Tom Tromey
Subject: Re: [PATCH v2 02/13] script language API for GDB: extension.[ch]
Date: Mon, 06 Jan 2014 14:53:47 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

>>>>> "Ludovic" == Ludovic Courtès <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]