From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by sourceware.org (Postfix) with ESMTPS id ECDCF3858D28 for ; Wed, 15 Feb 2023 21:16:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ECDCF3858D28 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-f53.google.com with SMTP id m16-20020a05600c3b1000b003dc4050c94aso69569wms.4 for ; Wed, 15 Feb 2023 13:16:53 -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:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2JA9/HybicXi/aR+pPbYiDCsXWSWL/7fF8Mf4+k4VR4=; b=c1cc1YpGB2odTfTPM1S8XXKScVigCkQVuSsHonxCRJlmKUrRpMVcn4zDye8azVQc99 q2JVeIYnnMj1Sl4q2NwQJA5q06LCVUzBW+9kqpPxeHNbudVlquEjq2Ldl4zPotQta/ad 2SzUj5jq3owwzy1d2+mCqoyZdcDmzuf5NQmb4hdO6c8CBpfY7HG/TSdQMB3RcGvh7WFX 9Zna0R7UUhmsG4q5NDKIp40GmIsTlg+3eNa2TYaChVUeSws6FvjRLqkACGc8tQN9SlxQ x/MVu66rGzmXcvZ7okr3z0yfNCqh9s6sQuCPd0mLZ2dXwTXE2kbdZrCSI/3c7Rh+UVWE feFw== X-Gm-Message-State: AO0yUKWnuB1Y87+0gzAfJ7QGl6XfTxsAUI+7KEVEBo0fkbDeE/L1cRbb LmuMaoeo5Gmoji8/ekGKGg+6tdw0HkbLdw== X-Google-Smtp-Source: AK7set8AaNwAgoufsaIclOO7ksO5FLYkArrP87T3FLDokioEhqwewpmhhEreJRAHTRXVj+MkG+AyOA== X-Received: by 2002:a05:600c:1819:b0:3db:1434:c51a with SMTP id n25-20020a05600c181900b003db1434c51amr3105650wmp.40.1676495812542; Wed, 15 Feb 2023 13:16:52 -0800 (PST) Received: from ?IPv6:2001:8a0:f92b:9e00::1fe? ([2001:8a0:f92b:9e00::1fe]) by smtp.gmail.com with ESMTPSA id p17-20020a05600c469100b003dd1b00bd9asm3488909wmo.32.2023.02.15.13.16.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Feb 2023 13:16:52 -0800 (PST) Subject: Re: [PATCH 6/6] Don't throw quit while handling inferior events, part II 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> From: Pedro Alves Message-ID: <395ffc36-d9a2-d809-d122-1701ef787cae@palves.net> Date: Wed, 15 Feb 2023 21:16:49 +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: <87edqstf7p.fsf@tromey.com> 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-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.