From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta037.useast.a.cloudfilter.net (omta037.useast.a.cloudfilter.net [44.202.169.36]) by sourceware.org (Postfix) with ESMTPS id F33513858D20 for ; Fri, 1 Sep 2023 21:26:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F33513858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from eig-obgw-5009a.ext.cloudfilter.net ([10.0.29.176]) by cmsmtp with ESMTP id c6JBqHYeVWU1ccBfMqfMPO; Fri, 01 Sep 2023 21:26:56 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id cBfLqjGcD75UicBfLqL7wY; Fri, 01 Sep 2023 21:26:55 +0000 X-Authority-Analysis: v=2.4 cv=eLYAMVl1 c=1 sm=1 tr=0 ts=64f2571f a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=zNV7Rl7Rt7sA:10 a=Qbun_eYptAEA:10 a=CCpqsmhAAAAA:8 a=N4aXgCxLzDPhepsk_vIA:9 a=ul9cdbp4aOFLsgKbc677:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Vx9UW6Jv0DW0UeYTRs5EUZIiKN7TKTJMDYlIKYeOIqE=; b=B8gAOUIIyzaENX47cr8E/3cag/ jXEgzYLctmN3mku8y07X25+q+U0CAIiNie+opWSDMgNe7VAwYGsuXNUVtRJj8cXlRGLQllwkRwTjZ ymfamZ1TaKA5FW9oRybv/wBEg; Received: from 75-166-150-212.hlrn.qwest.net ([75.166.150.212]:55396 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qcA2c-001FUF-1f; Fri, 01 Sep 2023 13:42:50 -0600 From: Tom Tromey To: Gregory Anders via Gdb-patches Cc: Gregory Anders Subject: Re: [PATCH 4/4] gdb/dap: only include sourceReference if file path does not exist References: <20230901180323.22328-3-greg@gpanders.com> <20230901180323.22328-11-greg@gpanders.com> X-Attribution: Tom Date: Fri, 01 Sep 2023 13:42:49 -0600 In-Reply-To: <20230901180323.22328-11-greg@gpanders.com> (Gregory Anders via Gdb-patches's message of "Fri, 1 Sep 2023 12:55:41 -0500") Message-ID: <87jzt9of2e.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.150.212 X-Source-L: No X-Exim-ID: 1qcA2c-001FUF-1f X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-150-212.hlrn.qwest.net (murgatroyd) [75.166.150.212]:55396 X-Source-Auth: tom+tromey.com X-Email-Count: 0 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfDssaWc32p16//GP0nl1kGBYJ8ZIndpxcG+NJDmHRh94rFe/ndARiKrorM0cqBm6DDbtAkER0Gi8u3KWmFJaZ2Nd7q6pyuXUOXINSFjtBtqRPnWGn1Ig f9x0pPKFlBS8DM/XF3D8OIgvJdmXasx3fNtVAr1eo63MRs6lsjbOBQmw7HIKqzq8/hxYKXQCLOS48JWO5yAY+hTYx1ErTiSEPW0= X-Spam-Status: No, score=-3018.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,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: >>>>> "Gregory" == Gregory Anders via Gdb-patches writes: Thank you for the patch. Gregory> According to the DAP specification if the "sourceReference" field is Gregory> included in a Source object and is non-zero, then the DAP client _must_ Gregory> make a "source" request to the debugger to retrieve file contents, even Gregory> if the Source object also includes path information. On closer reading (this isn't the first time I've gotten the DAP spec wrong) I think you are right. The docs for the Source object say: * If the value > 0 the contents of the source must be retrieved through the * `source` request (even if a path is specified). ... which I think supports your view. Gregory> + if not os.path.exists(fullname): Gregory> + global _next_source I suspect we should just remove all sourceReference handling from sources.py, because if we can't find a full path, gdb isn't going to be able to come up with the source anyway. What do you think? I thought the test suite might need some updates but I don't see any references to sourceReference there. Tom