From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta034.useast.a.cloudfilter.net (omta034.useast.a.cloudfilter.net [44.202.169.33]) by sourceware.org (Postfix) with ESMTPS id DF0033858C53 for ; Fri, 8 Dec 2023 18:05:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DF0033858C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DF0033858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702058701; cv=none; b=hFXJZEYyA/j16cG2fRbb3EoB1OJbOlvIXZ+DAhWB8spKeRuXOai05dG2905e31/haEwlY1USA2MhYev690PTOgQgK3KGzQkt8rfyuCNzzIrmcX2Wr/olYS+savK9JB8meG94rszqunAE8RERh/p/IZSzcICUD+rngtAljUoC+H0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702058701; c=relaxed/simple; bh=AxV98ogx5uVBFdlrCHTudEGj2oxxe8KyY3qftHOSaQg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=iA+yOkcEQOKH0FessQSlcJJiQ/vtsDQ6M8F/6wL53gODAIWvRIoPQKBUv5Rz6KPbk/CljamXwavkfveTb59wC3uVD8+UsTY3i1ARCQHe4/FrLAMlHj13jKUtd11fIPGRIrdEVY8OnVBllCL0QT8X/pqyVsN+g7H0k2P+CZoUXww= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6008a.ext.cloudfilter.net ([10.0.30.227]) by cmsmtp with ESMTPS id BcKqr022cjtZ3BfDorDFVO; Fri, 08 Dec 2023 18:05:08 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id BfDfrLGF00xkrBfDgrWnCf; Fri, 08 Dec 2023 18:05:00 +0000 X-Authority-Analysis: v=2.4 cv=N7U6qkxB c=1 sm=1 tr=0 ts=65735acc a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=e2cXIFwxEfEA:10 a=Qbun_eYptAEA:10 a=20KFwNOVAAAA:8 a=zstS-IiYAAAA:8 a=7XhtHW24XM5sEeLIYKIA:9 a=QEXdDO2ut3YA:10 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=hZdrv+YBhTuktJ0DMfGRvPSoamRZq66CBNbnLLUe464=; b=BD0kn0u391fsteWNMSGT/DC5ff oass/ZXdd5dy2R4gfeFSoXnAe6LjQFiPOJboRbnfq+VqH+Dw/2l7PFBpmLBmor5m9eeogfDGWq9Ic mkjAtTrwNp80zL22GyUIRoeHU; Received: from 71-211-161-25.hlrn.qwest.net ([71.211.161.25]:33370 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rBfDf-002PGo-1l; Fri, 08 Dec 2023 11:04:59 -0700 From: Tom Tromey To: Alexandra =?utf-8?B?SMOhamtvdsOh?= Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] gdb/python: avoid use of _PyOS_ReadlineTState References: <20231207110240.1853760-1-ahajkova@redhat.com> <20231207110240.1853760-2-ahajkova@redhat.com> X-Attribution: Tom Date: Fri, 08 Dec 2023 11:04:58 -0700 In-Reply-To: <20231207110240.1853760-2-ahajkova@redhat.com> ("Alexandra =?utf-8?B?SMOhamtvdsOhIidz?= message of "Thu, 7 Dec 2023 12:02:40 +0100") Message-ID: <87sf4cfu45.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.211.161.25 X-Source-L: No X-Exim-ID: 1rBfDf-002PGo-1l X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-161-25.hlrn.qwest.net (murgatroyd) [71.211.161.25]:33370 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfBsUqUN8x/jfVCcS1VF36G39ZA8fU88elPNYsdNRXZDHy16QGWJcDZO4BfyaPTFdH6ItTrY+TliJY8lZ/Q45/A7OkZ4JOv4xuxTTGRmTqDaZQJ82E+YY T57IAd4f+2WTkBulR321biEpCvVzUBlVkcxcsQJVtCWz5vxUKANt/2wiur9B1GARJY9YXft9YML6AMvy3soARZjNndjECUO+3zM= X-Spam-Status: No, score=-3016.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Alexandra" =3D=3D Alexandra H=C3=A1jkov=C3=A1 = writes: Alexandra> Instead of using _PyOS_ReadlineTState, I propose that we switch = to Alexandra> calling PyGILState_Ensure() and PyGILState_Release(). These fun= ctions Alexandra> will acquire the GIL based on the current thread. I think this = should Alexandra> be sufficient; I can't imagine why we'd be running Alexandra> gdbpy_readline_wrapper on one thread on behalf of a different Py= thon Alexandra> thread.... that would be unexpected I think. Makes sense to me. Approved-By: Tom Tromey Tom