From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id 6971F3858421 for ; Wed, 5 Jul 2023 14:02:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6971F3858421 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b6a6f224a1so111032851fa.1 for ; Wed, 05 Jul 2023 07:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688565725; x=1691157725; h=content-transfer-encoding:in-reply-to:from:cc:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=rH+LS9l9Luml+qQ8+VuihOcy0QKNg/gw1TvR00b+XWU=; b=BhbJzT86SpauyIPPPMVbKNkBQvK2/K1yWtn11z4RVYnXQmocuDmb8LsEYp3nVWnFYu i/9SJL9Ub4cQkAm13x4EEbYDDH+MhTbBL3CpkNJF6R3s23HBVRsWDbFknpnZ7dOe0abA zDbq/m47g860veXw/bbv3P0851GsHx56YYyaBgLB/ljinJRZfgdpkC7pqXlPlNvwgMDz BI40NVlspILwtO+WdAo+OdX2H5EJC1Vq7mN6iLrSznwHK3dAB3txBt30Ya+5lkSlRpXu zBl0r1WVo1bHaPZqvNJ4RM0H8/MM+23+Y7lUhjJGz0a1UdiSNWRxLx78B9BQE0L+itQr 7mGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688565725; x=1691157725; h=content-transfer-encoding:in-reply-to:from:cc:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rH+LS9l9Luml+qQ8+VuihOcy0QKNg/gw1TvR00b+XWU=; b=U/PK+qdWKhiv8908pODOsdyCtG+jR2pcQd7Kc3eBHpGN4xdcwuOnEotniDLsiiTqzY 3Un08YDz+tOs3w//9lD1Jot18Jj4KKNTFmCk7MiA4V/OstL+i19mAJkL+xyPYllt90XF 5LeoM+QgUsDKIMcqrQdeDeGrnCy+1hxQ9Q8gu/PnjwhLYR2pOIgxkUDoHzOiLXVVkjKz 8ri5J+P1Zv2GX8NS1G0GKQe2ycMc1+ypfRAbfAVppBKMyml1oSlWULHWhb69/lF7tSdl V2MzpPl2MiePlmPSmGNVxaZL28y4r/3kxsXcWna0v+yAKKV4nlfXSIZaBoTCaZozVJDv wR/Q== X-Gm-Message-State: ABy/qLYP5dri5CujWvD0WoczBuYSdeTOI/Rt+/QdVnp2mFxfdYUw9lxw r0zoxk1LV7S0MyokpaZxDddBJOqRJlU= X-Google-Smtp-Source: APBJJlFHNIFaMV+GExxrWtJUG4JGoIsU7uPkM5wzK+co0B1kDs3FIY9PSXTgpNQ8aPwcYxRAF2ZPmg== X-Received: by 2002:a05:6512:250d:b0:4fb:8966:5720 with SMTP id be13-20020a056512250d00b004fb89665720mr13348141lfb.25.1688565724067; Wed, 05 Jul 2023 07:02:04 -0700 (PDT) Received: from ?IPV6:2001:2044:c7:5500:5637:6b43:7745:198c? ([2001:2044:c7:5500:5637:6b43:7745:198c]) by smtp.gmail.com with ESMTPSA id d27-20020ac25edb000000b004fbb4ad1bbdsm1499107lfq.102.2023.07.05.07.02.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jul 2023 07:02:03 -0700 (PDT) Message-ID: <79d036ac-81f5-ee9b-233c-0b2f6f5a0f11@gmail.com> Date: Wed, 5 Jul 2023 16:02:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v1] gdb/DAP - Add completionsRequest To: Tom Tromey References: <20230628162616.102268-1-simon.farre.cx@gmail.com> <874jmkx11c.fsf@tromey.com> Content-Language: en-US Cc: gdb-patches@sourceware.org From: Simon Farre In-Reply-To: <874jmkx11c.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > I think it's preferable to write something anyway. I'll update next patch with descriptive commit message. > > Simon> + > Simon> +def _completions(text: str, column: int, line: Optional[int], frameId: Optional[int]): > > This should be marked @in_gdb_thread. > > Since 'line' isn't used, I think it can just be removed here and also > from 'completions' itself, as it is optional anyway. Right, I added it to make it look 1-to-1 with the DAP spec, _even though_ we don't actually use them in GDB, as I find this approach less confusing - if a GDB contributor (or user) were to look up the signature, then look at the DAP spec and not see the same things. But I'll remove the things that doesn't make sense, as it were, in GDB-land in the next patch. > Shouldn't 'column' be used? Like perhaps the text should be truncated > at the given column. (It's also fine to do this work in the main > thread.) I tried doing that, and no matter how or what I did, VSCode ended up just vomitting out the wrong result. I'm not sure if that's an error I made or VSCode not being exactly compliant with the spec. This patch was the one that finally made the request work in VSCode. I'll have another look at it though. Thanks!