From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 EDD443857803 for ; Wed, 24 Nov 2021 12:22:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EDD443857803 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-34-XTGzA7PiM_ip9NjKAgorow-1; Wed, 24 Nov 2021 07:22:21 -0500 X-MC-Unique: XTGzA7PiM_ip9NjKAgorow-1 Received: by mail-wm1-f70.google.com with SMTP id l4-20020a05600c1d0400b00332f47a0fa3so1335099wms.8 for ; Wed, 24 Nov 2021 04:22:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0eOObsBIIIsSau0TRPnWC+sCoi6o/smQo3uqwiPByfk=; b=xpFemCa8T0pOl0t/9mE1wRxft3m3h83ADetPWMlMycLi1YDwc6JMCk+qEc0vjonSCH tGlY0CSyXF4xFIfnFdAnAyvBMmQ4jWHs8rAdDYVhOC0H5DukJGT/Q6D+kgQOvLEkvQvd K5tlUmUNYr7ue2BE9SWLMQIef64gFDsOUz8WOtqX4hRcVX17SOwtmUnCCou8QdwVfxj0 ZH/FrMmMsmdXira5UjK3CkxeT+Sfwbq/p4XUtfSM0/5Ism5H51cdIxh0N3UXmLX8t6Qd 2Elb+zhERjtuSBflo99El8IqSWZxbjl8bA+XP7m3UTuNqY6Zz1u5Jsy3zMkzXIN8Sl+Z nSPQ== X-Gm-Message-State: AOAM530SW4qP7wpoi8aro0QiUASYkFQ/jQoIFOETUDyou2MMc3p2TUdE z1tGHGyx74Xug8yMm7BJMl2j7GHRhJ5DUv8M+cJteZs+MLHOJ2ROCOqOrQOhBgRRdVbP79SGi1q OurP8zu7cq7xnA/Ml/7LepMWRv9qO/VdBDcn4xiESaaxSoDOmCEetAXQRBmGn+s6808cDlzV8Vg == X-Received: by 2002:a05:600c:1c87:: with SMTP id k7mr14882253wms.103.1637756540163; Wed, 24 Nov 2021 04:22:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxa61IYuHc19d6Zx+DPo1i3n9Vcl6qkYe/BdF6co+H6jqFmhMNbrsCKMd+X/ArHuFpQreu5Hw== X-Received: by 2002:a05:600c:1c87:: with SMTP id k7mr14882206wms.103.1637756539940; Wed, 24 Nov 2021 04:22:19 -0800 (PST) Received: from localhost (host86-166-129-255.range86-166.btcentralplus.com. [86.166.129.255]) by smtp.gmail.com with ESMTPSA id l26sm5433298wms.15.2021.11.24.04.22.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 04:22:19 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 4/6] gdb: simplify remote_target::is_async_p Date: Wed, 24 Nov 2021 12:22:07 +0000 Message-Id: <73d6c2efd1d5c1a8bbd26e30d7eecef176ff463a.1637756330.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 24 Nov 2021 12:22:24 -0000 This commit simplifies remote_target::is_async_p by removing the target_async_permitted check. In previous commits I have added additional assertions around the target_async_permitted flag into target.c, as a result we should now be confident that if target_can_async_p returns false, a target will never have async mode enabled. Given this, it should not be necessary to check target_async_permitted in remote_target::is_async_p, if this flag is false ::is_async_p should return false anyway. There is an assert to this effect in target_is_async_p. There should be no user visible change after this commit. --- gdb/remote.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index 6ecea5b7fd7..25a4d3cab6e 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -14390,13 +14390,8 @@ remote_target::can_async_p () bool remote_target::is_async_p () { - struct remote_state *rs = get_remote_state (); - - if (!target_async_permitted) - /* We only enable async when the user specifically asks for it. */ - return false; - /* We're async whenever the serial device is. */ + struct remote_state *rs = get_remote_state (); return serial_is_async_p (rs->remote_desc); } -- 2.25.4