From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by sourceware.org (Postfix) with ESMTPS id A9B803858D33 for ; Tue, 10 Jan 2023 16:57:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A9B803858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=serhei.io Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=serhei.io Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 2FB1732009E1; Tue, 10 Jan 2023 11:57:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 10 Jan 2023 11:57:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=serhei.io; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1673369876; x=1673456276; bh=KKLfMoDGN2Gs4JtyruciIB1ii 7Ym5r/poUdXCzlVIw8=; b=d+vOy6WyhTAB4OCWemntnkODyoBIKEwsOakdb+9KH K1ALGbO8IjRq17tJ/4WZQDSMmk0zOj3J31xNrMiinDfexatP++mWa9U1HtvdJ02t Ik5MnjPsiRREA0a0wx913dzvWUXnBytlLtZ2Z4OPoUwOneknYQAPAbqnQTCM73K1 0JeROAC0ffaOVTz+C68iQizU7VCbk7dcVcXny+olRV2zMXPNFlKHC7eiMQNfTg5W VvBFsVYfYbJ4pS1Lx8cJyEBUKkoXqw/uhglGWdRYvjO8IdglWV0aunqsBwDTcE6Q fw7EbtQBSAReeUcUFWCsWo9nYfE0WPnvcVs4DzXaFXJpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1673369876; x=1673456276; bh=KKLfMoDGN2Gs4JtyruciIB1ii7Ym5r/poUd XCzlVIw8=; b=gozCuwYBuJqLN/fdjWqkJt+RPTBfngXPzB66wgPvXAKvKbQ7V7N V57IXwQtANexaPHjzsqP2P/nXy7be1jYwOhpER9hn3xdOOU3Nq/8z72Dj4EQKGFl dpE6iCmrppGvmPrmeqdBBxauziWc0saVgLgC5AhJ8iSVnzrZAMU9g8ezYEllJmSf Pf51ijYzyuyBHd8QdOspxV/x5ORyom5wvJf1rCLWXM6C595IMxQZIqdX0BuR23c7 pQdHkKdqeSLTZr26kf4yoSnfrzy15T5AOKpFzZAO2vUGMqvxI1wO0MuFg37BJdsu 775tzBjBMFzIwpiwJzfGsks2XIIrHLxGrjQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrledvgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgggfestdekredtre dttdenucfhrhhomhepufgvrhhhvghiucforghkrghrohhvuceoshgvrhhhvghisehsvghr hhgvihdrihhoqeenucggtffrrghtthgvrhhnpeehvdffffevkeeugfdvlefhleeivdejke ffveeifeeltdfgudeifefgleetgfeufeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehsvghrhhgvihesshgvrhhhvghirdhioh X-ME-Proxy: Feedback-ID: i572946fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 Jan 2023 11:57:56 -0500 (EST) From: Serhei Makarov To: elfutils-devel@sourceware.org Cc: Serhei Makarov Subject: [PATCH] debuginfod-find.1: note on how to find a comp_dir Date: Tue, 10 Jan 2023 11:57:42 -0500 Message-Id: <20230110165742.120109-1-serhei@serhei.io> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,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: doc/ChangeLog: * debuginfod-find.1: add a note to DESCRIPTION section for the 'source' subcommand, clarifying where to find the CU compilation-directory. I'm looking at how to improve and document the workflow for using debuginfod-find to study the behaviour of packaged software on a system, e.g. in conjunction with a tracing tool like SystemTap. You can read the exact compiled source code with debuginfod-find source and use that to figure out which source code locations are interesting to trace. But that process has several non-obvious or inconvenient steps. This patch is a clarification to the debuginfod-find source man page pointing out the eu-readelf command that can show the comp_dir in downloaded debuginfo. Since debuginfod-find source could be picked up and used by a developer unfamiliar with DWARF terminology, I think such a clarification saves time for newbies figuring out what a CU compilation-directory is. Signed-off-by: Serhei Makarov --- doc/debuginfod-find.1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/debuginfod-find.1 b/doc/debuginfod-find.1 index 957ec7e7..7d577bab 100644 --- a/doc/debuginfod-find.1 +++ b/doc/debuginfod-find.1 @@ -92,6 +92,19 @@ is made up of multiple CUs. Therefore, to disambiguate, debuginfod expects source queries to prefix relative path names with the CU compilation-directory, followed by a mandatory "/". +Note: for software packaged by distributions, the CU +compilation-directory may not be obvious. It can be found by +inspecting AT_comp_dir values in downloaded debuginfo. For example, +the comp_dir of the Fedora 37 version of /bin/ls can be found as +follows: + +.SAMPLE +% debuginfod-find debuginfo /bin/ls +~/.cache/debuginfod_client/03529d48345409576cd5c82a56ad08555088d353/ +% eu-readelf -w ~/.cache/debuginfod_client/03529d48345409576cd5c82a56ad08555088d353/debuginfo | grep comp_dir + comp_dir (line_strp) "/usr/src/debug/coreutils-9.1-6.fc37.x86_64/separate" +.ESAMPLE + Note: the caller may or may not elide \fB../\fP or \fB/./\fP or extraneous \fB///\fP sorts of path components in the directory names. debuginfod accepts both forms. Specifically, debuginfod canonicalizes path names -- 2.38.1