From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55408 invoked by alias); 12 Oct 2018 14:52:02 -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 55391 invoked by uid 89); 12 Oct 2018 14:52:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy= X-HELO: mail-wm1-f66.google.com Received: from mail-wm1-f66.google.com (HELO mail-wm1-f66.google.com) (209.85.128.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Oct 2018 14:52:00 +0000 Received: by mail-wm1-f66.google.com with SMTP id z204-v6so13251060wmc.5 for ; Fri, 12 Oct 2018 07:52:00 -0700 (PDT) Return-Path: Received: from ?IPv6:2a02:c7f:ae6a:ed00:4685:ff:fe66:9f4? ([2a02:c7f:ae6a:ed00:4685:ff:fe66:9f4]) by smtp.gmail.com with ESMTPSA id e21-v6sm1927321wma.8.2018.10.12.07.51.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 07:51:57 -0700 (PDT) Subject: Re: [PATCH v2] Release the GIL while running a gdb command or expression To: gdb-patches@sourceware.org References: <20181010202233.17985-1-tom@tromey.com> From: Phil Muldoon Message-ID: Date: Fri, 12 Oct 2018 14:52:00 -0000 MIME-Version: 1.0 In-Reply-To: <20181010202233.17985-1-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00292.txt.bz2 On 10/10/2018 21:22, Tom Tromey wrote: > PR python/23615 points out that gdb.execute_gdb_command does not > release the Python GIL. This means that, while the gdb command is > running, other Python threads do not run. > > This patch solves the problem by introducing a new RAII class that can > be used to temporarily release and then re-acquire the GIL, then puts > this into the appropriate places in execute_gdb_command and > gdbpy_parse_and_eval. > > This version of the patch includes a test case from Phil. I know I said this on the other email, but, Version 2 LGTM also. Cheers Phil