public inbox for
 help / color / mirror / Atom feed
From: Serhei Makarov <>
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	[thread overview]
Message-ID: <> (raw)


* 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
+% debuginfod-find debuginfo /bin/ls
+% 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"
 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

                 reply	other threads:[~2023-01-10 16:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).