From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out-236.mta0.migadu.com (out-236.mta0.migadu.com [91.218.175.236]) by sourceware.org (Postfix) with ESMTPS id D6B023858419 for ; Fri, 1 Sep 2023 18:04:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D6B023858419 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=gpanders.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gpanders.com X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpanders.com; s=key1; t=1693591496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VmFJEdAeDt4aq4V/2yhTJEYAgrpFwmlPkIC8mAHbiYE=; b=lBpeKpvqVUbxaL5UsRGPUb6fXV7SxWcCpAWK11UXNtoAkvQW1DoDs2flalBzevb5GLl3eV xcRC2H/N0UoLZGKwsuq/vnDXQMDChgAS9b3T19O4t62hLzivjHgQH0e8WrpD2Zfkjt2VSA E4NPuH8zfbFQk+pZql8TRQhnW+e4z9Mf+tIub7fbdj5rSKmBGa9Y57ytz3S+6kewo/oygy //146gYWlbPj/cVqszboeizmh6CBPGfSVg8/Bz1ueEAkuYNBTIQqpZzZStOLvnBXcj7Okf PgwPG/rdON3JKG9JL8FQTMr8xCLD2H6VHu8fgTWKpA3DzqsZB/ZSLqe6ixqEHA== From: Gregory Anders To: gdb-patches@sourceware.org Cc: Gregory Anders Subject: [PATCH 3/4] gdb/dap: use breakpoint fullname to resolve source Date: Fri, 1 Sep 2023 12:55:39 -0500 Message-ID: <20230901180323.22328-9-greg@gpanders.com> In-Reply-To: <20230901180323.22328-3-greg@gpanders.com> References: <20230901180323.22328-3-greg@gpanders.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP 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: If the breakpoint has a fullname, use that as the source path when resolving the breakpoint source information. This is consistent with other callers of make_source which also use "fullname" if it exists (see e.g. DAPFrameDecorator which returns the symtab's fullname). --- gdb/python/lib/gdb/dap/breakpoint.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/python/lib/gdb/dap/breakpoint.py b/gdb/python/lib/gdb/dap/breakpoint.py index 0ebb9597..49efff10 100644 --- a/gdb/python/lib/gdb/dap/breakpoint.py +++ b/gdb/python/lib/gdb/dap/breakpoint.py @@ -108,6 +108,9 @@ def _breakpoint_descriptor(bp): loc = bp.locations[0] if loc.source: (filename, line) = loc.source + if loc.fullname is not None: + filename = loc.fullname + result.update( { "source": make_source(filename, os.path.basename(filename)), @@ -118,9 +121,6 @@ def _breakpoint_descriptor(bp): if loc.address: result["instructionReference"] = hex(loc.address), - path = loc.fullname - if path is not None: - result["source"]["path"] = path return result -- 2.42.0