summaryrefslogtreecommitdiffstats
path: root/doc/srcfiles.1
diff options
context:
space:
mode:
authorHousam Alamour <halamour@redhat.com>2023-10-25 14:52:36 -0400
committerFrank Ch. Eigler <fche@redhat.com>2024-01-26 12:21:36 -0500
commit1b14821efe57d0e0a2fdb51c80c85daa33c3b258 (patch)
tree95e5bb2262e1389ac798f63d6220f95355b6ddd0 /doc/srcfiles.1
parent7554d41cd3784a321751c9ac430ad123f6c8cc1e (diff)
PR 30991: srcfiles tarball featureupstream/users/halamour/try-pr30991-squashed
* srcfiles.cxx: Introduce new --zip option that places all the source files associated with a specified dwarf/elf file into a zip file and sends it to stdout. Files may be fetched from debuginfod (if applicable) or locally as a backup. Added -b option to disable the backup of checking for files locally in -z mode. * run-srcfiles-self.sh: Added test-case for the new zip feature that archives the source files of the srcfiles tool and checks archive integrity. An additional test ensures that if debuginfod is enabled, the files are fetched and archived properly while maintaing integrity. * debuginfod-subr.sh: On very slow/remote storage, it can take O(minute) to finish indexing the entire elfutils build tree, so a wait_ready4 shell function is one way to let a longer debuginfod wait operation work. * srcfiles.1, NEWS: Added documentation for the new zip feature. * configure.ac: Simplify check for libarchive for srcfiles.cxx by integrating it into the same check for debuginfod. * Makefile.am: build with local copy of debuginfod-client. Example: % ./src/srcfiles -z -e /bin/ls > output.zip https://sourceware.org/bugzilla/show_bug.cgi?id=30991 Signed-off-by: Housam Alamour <halamour@redhat.com>
Diffstat (limited to 'doc/srcfiles.1')
-rw-r--r--doc/srcfiles.133
1 files changed, 28 insertions, 5 deletions
diff --git a/doc/srcfiles.1 b/doc/srcfiles.1
index 6149c21b..c6338315 100644
--- a/doc/srcfiles.1
+++ b/doc/srcfiles.1
@@ -21,15 +21,18 @@
eu-srcfiles \- Lists the source files of a DWARF/ELF file.
.SH "SYNOPSIS"
-eu-srcfiles [\fB\-0\fR|\fB\-\-null\fR] [\fB\-c\fR|\fB\-\-cu\-only\fR] [\fB\-v\fR|\fB\-\-verbose\fR] INPUT
+eu-srcfiles [\fB\-0\fR|\fB\-\-null\fR] [\fB\-c\fR|\fB\-\-cu\-only\fR] [\fB\-v\fR|\fB\-\-verbose\fR] [\fB\-z\fR|\fB\-\-zip\fR] INPUT
.SH "DESCRIPTION"
-\fBeu-srcfiles\fR lists the source files of a given \s-DWARF/ELF\s0
+\fBeu-srcfiles\fR lists all the source files of a given DWARF/ELF
file. This list is based on a search of the DWARF debuginfo, which
may be automatically fetched by debuginfod if applicable. The target
file may be an executable, a coredump, a process, or even the running
-kernel. The default is the file 'a.out'. The source file names are
-made unique and printed to standard output.
+kernel. The default input is the file 'a.out'. The source file names are
+made unique by prepending the full path name and then printed to standard output. The source files can be
+placed in a zip file that is sent to stdout.
+
+Note that all occurrences of '/./' and '/../' in the path name are canonicalized.
.SH "INPUT OPTIONS"
The long and short forms of options, shown here as alternatives, are
@@ -81,13 +84,28 @@ Print program version.
Separate items by a null instead of a newline.
.TP
+\fB\-b, \-\-no-backup\fR
+Disables local source file search when
+debuginfod fails to fetch files. This
+option is only applicable when fetching and
+zipping files.
+
+.TP
\fB\-c, \-\-cu\-only\fR
-Only list the CU names.
+Only list the CU (compilation unit) names.
.TP
\fB\-v, \-\-verbose\fR
Increase verbosity of logging messages.
+.TP
+\fB\-z, \-\-zip\fR
+Zip all the source files and send to stdout.
+By default, files will be automatically fetched by
+debuginfod (if applicable) or locally as a
+backup. Any source files that were not found
+will not be archived.
+
.SH EXAMPLES
@@ -119,6 +137,11 @@ List the source files of a kernel image.
eu-srcfiles -e /boot/vmlinuz-`uname -r`
.ESAMPLE
+Zip all the source files for a binary.
+.SAMPLE
+eu-srcfiles -z -e /bin/ls > ls.zip
+.ESAMPLE
+
.SH "AUTHOR"
Written by Housam Alamour.