[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: |
Tue, 07 Jan 2014 09:02:59 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
>>>>> "Ludovic" == Ludovic Courtès <address@hidden> writes:
Ludovic> So do I get it right that it’s GDB that does signal(SIGINT, ...), and
Ludovic> its handler just calls PyOS_InterruptOccurred (or so) if Python code
Ludovic> happens to be running?
Yeah.
>> 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.
Ludovic> Would it work, upon SIGINT, to do something like:
Ludovic> (system-async-mark (lambda ()
Ludovic> (throw 'system-error ... EINTR)))
Ludovic> That would eventually raise an exception in Scheme code.
According to the Guile docs one must use scm_sigaction, since
scm_system_async_mark is not async-signal-safe.
However scm_sigaction takes over the signal. I don't think that will
work ok. Also this idea doesn't address how it would interact with the
gdb core or with Python.
Tom
- Re: [PATCH v2 02/13] script language API for GDB: extension.[ch], Tom Tromey, 2014/01/06
- Re: [PATCH v2 02/13] script language API for GDB: extension.[ch], Ludovic Courtès, 2014/01/07
- Re: [PATCH v2 02/13] script language API for GDB: extension.[ch],
Tom Tromey <=
- Re: [PATCH v2 02/13] script language API for GDB: extension.[ch], Ludovic Courtès, 2014/01/07
- Re: [PATCH v2 02/13] script language API for GDB: extension.[ch], Tom Tromey, 2014/01/07
- Re: [PATCH v2 02/13] script language API for GDB: extension.[ch], Tom Tromey, 2014/01/14
- Re: [PATCH v2 02/13] script language API for GDB: extension.[ch], Ludovic Courtès, 2014/01/15
- Re: [PATCH v2 02/13] script language API for GDB: extension.[ch], Mark H Weaver, 2014/01/21
- Re: [PATCH v2 02/13] script language API for GDB: extension.[ch], Doug Evans, 2014/01/21