From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id LFnsCxN4pWSHyhYAWB0awg (envelope-from ) for ; Wed, 05 Jul 2023 10:02:59 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=AhMTMc7y; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 20B451E0BD; Wed, 5 Jul 2023 10:02:59 -0400 (EDT) Received: from server2.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 0C71F1E00F for ; Wed, 5 Jul 2023 10:02:57 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4E8303857011 for ; Wed, 5 Jul 2023 14:02:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E8303857011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1688565776; bh=rH+LS9l9Luml+qQ8+VuihOcy0QKNg/gw1TvR00b+XWU=; h=Date:Subject:To:References:Cc:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=AhMTMc7yzLb6Zcv0hPsTlqWTzBgHRTCGq7cf5QP1k/V10KRGet3OMiorZbizRjGHv UpV30E3wfCzmPiVd/zEA0M8Uz6uISUtv3XG+7S14XQbKnXbJBbv++AWlvcfayXGbxG IG2bdegK2IuLH34y1XqiNo6raCV+0Oq4SfG+O75k= 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 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b6a6f224a1so111032851fa.1 for ; Wed, 05 Jul 2023 07:02:06 -0700 (PDT) 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 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 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: Simon Farre via Gdb-patches Reply-To: Simon Farre Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > 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!