From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by sourceware.org (Postfix) with ESMTPS id B0AB33858C42 for ; Tue, 23 Apr 2024 12:30:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B0AB33858C42 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B0AB33858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713875458; cv=none; b=Lmf4Sjef2Gv8lsu4K7mzOYUYvY/vEkU+sqzd6N/X77eXgOPMKPVa6sJxYqPFcuAYh+Icr+KFgMj0c9CXhCYFU1PY08lHue/hzdSDPd6zmVpw/Nccx8sDDdfC4T+Wvv4jF+FQNFSl5Bspu3DvAt/gJEPZZBOAzM1Sbc4Yn6Qi6lk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713875458; c=relaxed/simple; bh=+7phVbqTebMZojMClruZsAfJ3Wq2dIpX3i1+4/SxTEY=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=lYgiIj+TXVc5DTGKh+q1UAouafPdCUbk0DdkJSbtTDmBH2V3yv31K3a0llp3GB9cc7KwJYJ99VSI2p40t8MM6L75ndLjV+wIk77cTL/GrJ/nUQ8ertHRhDmUJCMDBl1NaLJemiqd19i6oI54oHZ94C6xBJ59q3J0h9ryADFavEE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-343d7ff2350so4220628f8f.0 for ; Tue, 23 Apr 2024 05:30:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713875455; x=1714480255; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/0lmlAf2l1HCi50g2HRG99piyBGjk45HYklOHsydMIY=; b=u5Obweq8jGT5CJKSts2NXlGEIv52OwdfbpkLeaD3Zegce6FGwmy+5yhJ5uQ2MH5/Bl fcZHD/hnab0S2GcIbewcQT3IHFHNqiDzmD2/778QAwi453Vc8GQOoYidxgZWBo54kVDr j/axHIvjCMPpC+X3eHmCLKdGd0IYwqnWlDrtQHQGmoj18vXxE4N8YNheWwmiThWwWBzO jF1/l70M+EAihyI9/A2EiBUmYZIDG8IMnW2tDuNTsJshFJ8W55nTn2y7jeimpAToaIFf 74kEWEVRVtbZTi9z7NT6oUIXircrfcIbH6tknCI3YWNMQNj5XvW271VGxSwM3ULO+V5O ecCA== X-Gm-Message-State: AOJu0Yy/bbKF81cEjwuJaNcWLu16QoAGLpz5UhycgiPsdqdGuda/XuVu vG3yUWm+t30NRIhDVrbS1jzUTXXlypXn3CVOOz+dUuUktEta45kkrNn/8Q== X-Google-Smtp-Source: AGHT+IHEVI561kFTqF+RS+paN/1QIL/Eln0OXynKQGbhsPF3hziJMToybtHK1ypoKiB6gY8W4vsQWA== X-Received: by 2002:adf:978a:0:b0:343:e824:d798 with SMTP id s10-20020adf978a000000b00343e824d798mr9971676wrb.62.1713875455214; Tue, 23 Apr 2024 05:30:55 -0700 (PDT) Received: from ?IPV6:2001:8a0:f93d:b900:4f86:481:20cb:27d? ([2001:8a0:f93d:b900:4f86:481:20cb:27d]) by smtp.gmail.com with ESMTPSA id i13-20020a05600c354d00b00419fba938d8sm11407179wmq.27.2024.04.23.05.30.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Apr 2024 05:30:54 -0700 (PDT) Message-ID: <13a1488a-67e9-4f58-a9a1-8a78dbc4108c@palves.net> Date: Tue, 23 Apr 2024 13:30:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/12] gdb_target_is_remote -> gdb_protocol_is_remote To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20240419151342.1592474-1-pedro@palves.net> <20240419151342.1592474-11-pedro@palves.net> <87a5lpw58p.fsf@tromey.com> From: Pedro Alves Content-Language: en-US In-Reply-To: <87a5lpw58p.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,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: Hi! On 2024-04-19 19:56, Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves writes: > > Pedro> This is similar to the previous patch, but for gdb_protocol_is_remote. > Pedro> gdb_is_target_remote and its MI cousin mi_is_target_remote, use "maint > Pedro> print target-stack", which is unnecessary when checking whether > Pedro> gdb_protocol is "remote" or "extended-remote" would do. Checking > Pedro> gdb_protocol is more efficient, and can be done before starting GDB > Pedro> and running to main, unlike gdb_is_target_remote/mi_is_target_remote. > > Pedro> This adds a new gdb_protocol_is_remote procedure, and uses it in place > Pedro> of gdb_is_target_remote/mi_is_target_remote throughout. > > Pedro> There are no uses of gdb_is_target_remote/mi_is_target_remote left > Pedro> after this. Those will be eliminated in a following patch. > > Pedro> In some spots, we no longer need to defer the check until after > Pedro> starting GDB, so the patch adjusts accordingly. > > Makes sense to me, I have a question though. > > Pedro> +# Check if we are talking to a remote target. If so, bail out, as > Pedro> +# right now remote targets can't communicate vector length (vl or svl) > Pedro> +# changes to gdb via the RSP. When this restriction is lifted, we can > Pedro> +# remove this guard. > Pedro> +if {[gdb_protocol_is_remote]} { > Pedro> + unsupported "aarch64 sve/sme tests not supported for remote targets" > Pedro> + return -1 > Pedro> +} > > Seems like this spot could just use "require !gdb_protocol_is_remote" -- > any reason why you didn't do this? Really no reason. I've done that now locally, in the three spots I could do it. I also simplified the comment, as most of it is obvious/redundant: +# Remote targets can't communicate vector length (vl or svl) changes +# to GDB via the RSP. +require !gdb_protocol_is_remote