From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id hOqNAZsbuWEEFQAAWB0awg (envelope-from ) for ; Tue, 14 Dec 2021 17:32:59 -0500 Received: by simark.ca (Postfix, from userid 112) id EA69F1F0D2; Tue, 14 Dec 2021 17:32:58 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6FDD71F0BD for ; Tue, 14 Dec 2021 17:32:58 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 77CF73858010 for ; Tue, 14 Dec 2021 22:32:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77CF73858010 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1639521177; bh=sHJxR4yXdx4jJd4k4xvLQ7KDcL8PYfQXB6CrtZS4xh0=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=cENE3yjb87yFVemGaYFP0+yzmP1+VJFpZhoBuuflBR8odNgfQcN7fRwhZ9KiQYTNn WlsTbdVlY+gABPJOTXJnZy22c6qkfSFPRNswFt6pl3B9NlTXuDHdGdDr23r2W7ir1n j402kQvsIoacc8TOMDKekOk07fKlOuPVFTXQVYZU= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 1E1633858D28 for ; Tue, 14 Dec 2021 22:32:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1E1633858D28 Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-240-dojffkIaOGmvkHofC-4dZQ-1; Tue, 14 Dec 2021 17:32:35 -0500 X-MC-Unique: dojffkIaOGmvkHofC-4dZQ-1 Received: by mail-qv1-f72.google.com with SMTP id g15-20020a0562141ccf00b003cada9e7e2fso28853769qvd.1 for ; Tue, 14 Dec 2021 14:32:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sHJxR4yXdx4jJd4k4xvLQ7KDcL8PYfQXB6CrtZS4xh0=; b=r1BmJ4ANtogAozXYVPGzA8IXHeccoimS3dUqC46ykhcE6TO3DH5AfrdkGCaFK0hXvd +5ac95otw91iDsfwbpyiBiOYobvOv7wvbsEaLbK2tlodM0252RnRN6gt35g2o14iir4X dnwPPCSUtlckEXyyKOLMsAoeqGqDPn2FeOs0qONcEIWPh/kkvlGoMxk6sVrrDCEx3uRj 8VRu+ervksZG9FN7WSfWBDZotPWQGKmpp0FD0TuVnjAzKVKSpYK4at82t55PRlXI3XGI t/0E73uNeWGxXl/oyKHZKZMsSE6HQeh7LablaevPN+nECc0kfB/Olt8qSecVto4pJUGl vEMw== X-Gm-Message-State: AOAM531uWfWmy9NlZ8LJeWWckft7E89vptAQpzsBarOeK+6xATftXTdU rFF9oIEZo4lPqcTmntM6K+EFTdvThLmyYgM6CIawnrkl2R7LeayOmmjBwSO2tjBYfYh1SXXq0wZ wivU4GBhO9r4DjVcwU7EBBu4etwc7YcwJ3Y6K X-Received: by 2002:ad4:5cef:: with SMTP id iv15mr8549579qvb.102.1639521155186; Tue, 14 Dec 2021 14:32:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBlGc7dZ5Gb4HDkP6o6tw+PLepoM9nqWMIVoe7NKib5tgiQstNZvNBY2uauPDJ7eXngN8G1roYRyYoMI2W2is= X-Received: by 2002:ad4:5cef:: with SMTP id iv15mr8549566qvb.102.1639521154958; Tue, 14 Dec 2021 14:32:34 -0800 (PST) MIME-Version: 1.0 References: <20211124014314.217675-1-amerey@redhat.com> <87lf1470k1.fsf@tromey.com> In-Reply-To: <87lf1470k1.fsf@tromey.com> Date: Tue, 14 Dec 2021 17:32:24 -0500 Message-ID: Subject: Re: [PATCH] [PR gdb/27026] CTRL-C is ignored when debug info is downloaded To: Tom Tromey X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Aaron Merey via Gdb-patches Reply-To: Aaron Merey Cc: Aaron Merey via Gdb-patches , Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi Tom, On Wed, Dec 1, 2021 at 11:45 AM Tom Tromey wrote: > > >>>>> "Aaron" == Aaron Merey via Gdb-patches writes: > > Aaron> + gdb::optional term_state; > Aaron> + if (target_supports_terminal_ours ()) > Aaron> + { > Aaron> + term_state.emplace (); > Aaron> + target_terminal::ours (); > Aaron> + } > > I was curious to know if the gdb::optional and the > target_supports_terminal_ours checks are really needed here. > I think plenty of spots do this stuff unconditionally, so I > was wondering if this code has some special need. These checks came from Tom's draft of this patch. AFAICT it's done out of an abundance of caution in case this code runs before any inferior is loaded. I'm not sure that is currently possible but I think it's better to be safe than sorry here. Aaron