* [PATCH] debuginfod-find.1: note on how to find a comp_dir
@ 2023-01-10 16:57 Serhei Makarov
0 siblings, 0 replies; only message in thread
From: Serhei Makarov @ 2023-01-10 16:57 UTC (permalink / raw)
To: elfutils-devel; +Cc: Serhei Makarov
* 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 <email@example.com>
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
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-10 16:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 16:57 [PATCH] debuginfod-find.1: note on how to find a comp_dir Serhei Makarov
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).