From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21262 invoked by alias); 23 Dec 2013 21:57:58 -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 21252 invoked by uid 89); 23 Dec 2013 21:57:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 23 Dec 2013 21:57:57 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBNLvtRB008739 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 Dec 2013 16:57:55 -0500 Received: from barimba (ovpn-113-93.phx2.redhat.com [10.3.113.93]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBNLvs0U008410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 23 Dec 2013 16:57:54 -0500 From: Tom Tromey To: Doug Evans Cc: 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> Date: Mon, 23 Dec 2013 21:57:00 -0000 In-Reply-To: <52a7f3e8.e7ed440a.1c58.020f@mx.google.com> (Doug Evans's message of "Tue, 10 Dec 2013 21:10:37 -0800") Message-ID: <87vbyffcwu.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-12/txt/msg00897.txt.bz2 >>>>> "Doug" == Doug Evans writes: Doug> +void Doug> +clear_quit_flag (void) Doug> +{ Doug> + int i; Doug> + const struct extension_language_defn *extlang; Doug> + Doug> + ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang) Doug> + { Doug> + if (extlang->ops->clear_quit_flag != NULL) Doug> + extlang->ops->clear_quit_flag (extlang); Doug> + } Doug> + Doug> + quit_flag = 0; Doug> +} I don't think this will work properly. It seems to me that a given interrupt may be processed multiple times -- once by each extension language. The way it works right now, if Python handles the "quit", then Python clears the flag -- which also clears gdb's notion of the flag, because the two are identical. With the above it seems that Python could clear its flag -- but leave other extension languages unaware that the interrupt was handled. So, a subsequent call into Guile will presumably erroneously throw an exception. Tom