From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25026 invoked by alias); 22 Jan 2014 04:26:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 23574 invoked by uid 89); 22 Jan 2014 04:25:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: world.peace.net Received: from world.peace.net (HELO world.peace.net) (96.39.62.75) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 22 Jan 2014 04:25:57 +0000 Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1W5pNj-0001c9-BM; Tue, 21 Jan 2014 23:25:41 -0500 From: Mark H Weaver To: Tom Tromey Cc: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=), guile-user@gnu.org, gdb-patches@sourceware.org Subject: Re: [PATCH v2 02/13] script language API for GDB: extension.[ch] References: <52a7f3e8.e7ed440a.1c58.020f@mx.google.com> <87vbyffcwu.fsf@fleche.redhat.com> <87txdklqk4.fsf@gnu.org> <87r48kkc9g.fsf@fleche.redhat.com> <87eh4krl81.fsf@gnu.org> <87iotvixu4.fsf@fleche.redhat.com> <87vbxv8kag.fsf@gnu.org> <87sisqv0dm.fsf@fleche.redhat.com> Date: Wed, 22 Jan 2014 04:26:00 -0000 In-Reply-To: <87sisqv0dm.fsf@fleche.redhat.com> (Tom Tromey's message of "Tue, 14 Jan 2014 12:17:41 -0700") Message-ID: <87zjmomyt3.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2014-01/txt/msg00831.txt.bz2 Tom Tromey writes: >>>>>> "Ludovic" =3D=3D Ludovic Court=C3=A8s writes: > > Ludovic> I guess this is another limitation of Guile=E2=80=99s current si= gnal handling > Ludovic> strategy, and something we should fix. > > FWIW I think it would be sufficient for gdb if scm_system_async_mark, or > something like it, could be invoked from a signal handler. Then a > SIGINT in gdb could install an async callback that later checks gdb's > quit flag. As discussed on IRC, one way to accomplish this with current Guile is as follows: establish a dedicated thread whose sole job it is to call 'scm_system_async_mark_for_thread' as directed by messages received from a pipe. A signal handler can then schedule asyncs by writing messages to this pipe. We'll try to come up with an nicer solution at some point. Mark