From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id BD8F33858D20 for ; Thu, 1 Jun 2023 01:57:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD8F33858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-6af81142b6dso354524a34.2 for ; Wed, 31 May 2023 18:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1685584647; x=1688176647; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:errors-to:references:organization:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=HEXJOhSOKnBih9mOrzhxGYOKJie7+Gk3MI340vCDAtg=; b=koWrCILXuAkuR0zONu19gA6TarGEuKg3RHyyQY1FQ9eZh7q3nZA542g5BwNSpTaVBz ohqv6YBNnLyKE9+tuqHVMCArPPlBgPRccLQ3sV9bojx9N5KX4jsQfhqG8Hb+qiLLKgZF TrUVxOSqJr/YAxZMZD194zX4bgFIy3HKjLZmnHPl+TsF8E5Lf6cvTbtKvHioq04onBDR cDJziegVJJfoXw4ZFKGvK8RDqrt7Tx+LO//PkSXzDhx/2phqrswZykyg6+Nh2P3o1P7F DlI3x85srtEemdjaHluNOrNcALSLFWuueLDLbo/DY2QOZ6l+RU+lIiWyD7QTe7Uk2EAG JjZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685584647; x=1688176647; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:errors-to:references:organization:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HEXJOhSOKnBih9mOrzhxGYOKJie7+Gk3MI340vCDAtg=; b=UXRVLQMu/hR34hgf3PmX1NV3S+K8QhHxrgVazuJsRDV+VlFuqmIwgGWTwU3Lv1hrUY gtwkpBF8HWGSNS3/oCBkrg+801zU3Tjf1yUtmKWyxWqbR3MzJHJbERKughUDX1J79ggl A54txm5WTrY/tM46u68LrEUV4S0vccv9yewYTYlyWh3RLvCylj2/iEEeW4t6O3lU3p8i pC2k3MSVBBiqeP+vA1QtVYE1xzOOThpyJ4ElqurxYjPdh/p04UpgCjXiXONc98AF/jNb CfRzYK6QjNFyKA/7pHlg7yMaVnPWayF/YF9L+RDtmD3YiUtGKgHr9Dc4beH5ix/BQbQT e2JQ== X-Gm-Message-State: AC+VfDxChveaMFZsPFqr0Hb9B1fQZFk3Nx0H/a9/Py0ySXzTAS9xNM/w s/pCTWc0rRVU5RjwWYefHxS8wQ== X-Google-Smtp-Source: ACHHUZ4rjK1D3tLcwTRZmk8hnUDE19tseTkLpQHfrsDC5zQ4l/jZomUdkVK4dGslcw3JiWE2qS9A1w== X-Received: by 2002:a9d:7616:0:b0:6af:83cb:aa95 with SMTP id k22-20020a9d7616000000b006af83cbaa95mr3861804otl.31.1685584646924; Wed, 31 May 2023 18:57:26 -0700 (PDT) Received: from free.home ([2804:7f1:2080:f7d4:691e:1e3:9342:7fbc]) by smtp.gmail.com with ESMTPSA id a8-20020a056830008800b006af904d9c37sm1097199oto.45.2023.05.31.18.57.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 18:57:26 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 3511vFoP3910590 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 31 May 2023 22:57:16 -0300 From: Alexandre Oliva To: Paul Smith Cc: Arsen =?utf-8?Q?Arsenovi=C4=87?= , David Malcolm , Eli Zaretskii , "Frank Ch. Eigler" , gcc@gcc.gnu.org Subject: Re: LSP based on GCC Organization: Free thinker, does not speak for AdaCore References: <83a5y3xcai.fsf@gnu.org> <86mt22sheq.fsf@aarsen.me> <1852afca366ffcf4dcf17ec23e3db5c6134db6c5.camel@mad-scientist.net> Errors-To: aoliva@lxoliva.fsfla.org Date: Wed, 31 May 2023 22:57:15 -0300 In-Reply-To: <1852afca366ffcf4dcf17ec23e3db5c6134db6c5.camel@mad-scientist.net> (Paul Smith's message of "Tue, 30 May 2023 10:33:16 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: On May 30, 2023, Paul Smith wrote: > On Mon, 2023-05-29 at 17:16 -0300, Alexandre Oliva via Gcc wrote: >> On May 17, 2023, Arsen Arsenovi=C4=87 wrote: >>=20 >> > ISTR Alexandre Oliva (CC added) mentioning leveraging GDB to >> > implement various bits of LSP functionality, such as handling >> > multiple TUs. >>=20 >> I recall advancing that suggestion, reasoning that GDB was capable of >> combining information from multiple translation units and of >> reloading debug information, which GCC doesn't. > I'm not sure this will work well. The information LSP servers need is > quite a bit more detailed (I believe) than what is found in the object > file debug sections. It was well understood that augmenting debug information for LSP purposes would likely be needed, and that GDB's ability to combine debug information from multiple units would be advantageous to this end as well. An mode similar to thin LTO, that outputs internal representation along with debug information, rather than compiling all the way to machine code, was also in my mind. That's similar to the indexing you mention. > LSP servers are not intended to be limited to dealing with the code > that has already been compiled: not only do you want to be able to edit > code before it's been compiled, but you want to be able to query new > code as it's written in the editor, before it's even saved to disk. ISTM there's some miscommunication here. Using the compiler's parser and debug information generator to index a project is no more "compilation" than using the linker's ability to integrate multiple translation units and the debugger's ability to take debug information from them all to aid editing and other LSP activities amounts to "debugging", it's just using each project's strengths to achieve the desired goal. --=20 Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about