This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 02/13] script language API for GDB: extension.[ch]
- From: Doug Evans <xdje42 at gmail dot com>
- To: Mark H Weaver <mhw at netris dot org>
- Cc: Tom Tromey <tromey at redhat dot com>, Ludovic Courtès <ludo at gnu dot org>, guile-user at gnu dot org, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 21 Jan 2014 20:35:54 -0800
- Subject: Re: [PATCH v2 02/13] script language API for GDB: extension.[ch]
- Authentication-results: sourceware.org; auth=none
- References: <52a7f3e8 dot e7ed440a dot 1c58 dot 020f at mx dot google dot com> <87vbyffcwu dot fsf at fleche dot redhat dot com> <CAP9bCMQx_pDKsRTDv5h62kqO4==MTJ80XsZ2RYfpzsjDT1u68g at mail dot gmail dot com> <87txdklqk4 dot fsf at gnu dot org> <87r48kkc9g dot fsf at fleche dot redhat dot com> <87eh4krl81 dot fsf at gnu dot org> <87iotvixu4 dot fsf at fleche dot redhat dot com> <87vbxv8kag dot fsf at gnu dot org> <87sisqv0dm dot fsf at fleche dot redhat dot com> <87zjmomyt3 dot fsf at netris dot org>
On Tue, Jan 21, 2014 at 8:21 PM, Mark H Weaver <mhw@netris.org> wrote:
> Tom Tromey <tromey@redhat.com> writes:
>
>>>>>>> "Ludovic" == Ludovic Courtès <ludo@gnu.org> writes:
>>
>> Ludovic> I guess this is another limitation of Guile’s current signal 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.
Righto, and thanks.
I'll implement this as a follow-on to the current patch series.
It'll be mostly just new code, and the current patch series is big enough.