From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by sourceware.org (Postfix) with ESMTPS id 410743858434 for ; Wed, 15 Feb 2023 21:24:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 410743858434 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f51.google.com with SMTP id s13-20020a05600c45cd00b003ddca7a2bcbso88581wmo.3 for ; Wed, 15 Feb 2023 13:24:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:cc:to:from:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=r7GxxhUVA0cX/GxMyTd8Pajv2NUjlGJJYsE3kYpYbQM=; b=0zcJAXWnzdxpCfMkiSe6aGu3+K2tTPlff1v7ZsjAhT09yttCYhOBDMEb+XceoVHXND bu9DJRGJ6jw4R64dFYl3aJQqHgZ8Vei6g5ibVPUTQMNlhngFbVQNGBEQ6AfHasJBV33W 6uTjF4sFElFr3txCO2a9U6iJ37aMtw4GL3O61DdTMlT//EuGG1Xb37HXZBycO6MrszFH bhRkhHPNBuIBlY0DU4VmMcKWyLzHBuBhNyo2o/OGWuOu/FPtAFrU6C13jrR+3yfrp/YV ul7uNG7X6saKKs8Tp7K094yqa58IxxzfzVZsmZvBc5u7ujzgG/Ss7wsO7kKGBVsqdfx8 UvAA== X-Gm-Message-State: AO0yUKWe9uWZG0xjrURB16IeQ1ApG05fiGtHLzLv97xwOLePXpruu4Ls imq+kM+EXRTGGTmzhaeagEP1l24t5JLvHA== X-Google-Smtp-Source: AK7set/hj6l7y/VNIUhu6NTYFUBRG4tbgiKicFgbAOvV1HKAvmykbfjztcXQqt2DimJ5MNXAXMjYxQ== X-Received: by 2002:a05:600c:44d2:b0:3e2:662:add6 with SMTP id f18-20020a05600c44d200b003e20662add6mr1937965wmo.11.1676496241913; Wed, 15 Feb 2023 13:24:01 -0800 (PST) Received: from ?IPv6:2001:8a0:f92b:9e00::1fe? ([2001:8a0:f92b:9e00::1fe]) by smtp.gmail.com with ESMTPSA id l19-20020a1ced13000000b003e1f6e18c95sm3235251wmh.21.2023.02.15.13.24.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Feb 2023 13:24:01 -0800 (PST) Subject: Re: [PATCH 6/6] Don't throw quit while handling inferior events, part II From: Pedro Alves To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20230210233604.2228450-1-pedro@palves.net> <20230210233604.2228450-7-pedro@palves.net> <87edqstf7p.fsf@tromey.com> <395ffc36-d9a2-d809-d122-1701ef787cae@palves.net> Message-ID: <23a2ad58-6a57-7bd1-59e5-9e375744101b@palves.net> Date: Wed, 15 Feb 2023 21:24:00 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <395ffc36-d9a2-d809-d122-1701ef787cae@palves.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP 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: On 2023-02-15 9:16 p.m., Pedro Alves wrote: > On 2023-02-14 3:54 p.m., Tom Tromey wrote: >>>>>>> "Pedro" == Pedro Alves writes: >> >> Pedro> I noticed that if Ctrl-C was typed just while GDB is evaluating a >> Pedro> breakpoint condition in the background, and GDB ends up reaching out >> Pedro> to the Python interpreter, then the breakpoint condition would still >> Pedro> fail, like: >> >> Pedro> The fix is to disable cooperative SIGINT handling while handling >> Pedro> inferior events, so that SIGINT is saved in the global quit flag, and >> Pedro> not in the extension language, while handling an event. >> >> I wonder if there's an open PR about this. >> It sounds vaguely familiar. >> > > Hmm, I didn't see it the first time, but looking again, this one: > > https://sourceware.org/bugzilla/show_bug.cgi?id=26266 > > I think ends up fixed by the series, since normal_stop is called from > within fetch_inferior_events, while the quit_handler and cooperative > sigint handling are hijacked. > > I won't close that PR as in the linked discussion Andrew suggested > a good idea for a testcase. > Eh, and this one, in this comment: https://sourceware.org/bugzilla/show_bug.cgi?id=15297#c6 ... my older self touches on the problem that this patch fixes. I had completely forgotten that.