Copyright 2023 Red Hat Inc. Mon 2023-Sept 23 Housam Alamour <halamour@redhat.com> Contact elfutils-devel@sourceware.org to correct errors or typos. EU-SRCFILES 1 "2023-Sept-25" "elfutils"
..
"NAME"
eu-srcfiles - Lists the source files of a
DWARF/
ELF file.
"SYNOPSIS"
eu-srcfiles [
-0|
--null] [
-c|
--cu-only] [
-v|
--verbose] INPUT
"DESCRIPTION"
eu-srcfiles lists the source files of a given \
s-DWARF/
ELF\s0
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.
"INPUT OPTIONS"
The long and short forms of options, shown here as alternatives, are
equivalent.
--core=COREFILE
Find addresses from signatures found in COREFILE.
--debuginfo-path=PATH
Search path for separate debuginfo files.
-e FILE, --executable=FILE
Find addresses in FILE.
-k, --kernel
Find addresses in the running kernel.
-K, --offline-kernel[=RELEASE]
Kernel with all modules.
-M FILE, --linux-process-map=FILE
Find addresses in files mapped as read from FILE in Linux /proc/PID/maps format.
-p PID, --pid=PID
Find addresses in files mapped into process PID.
-?, --help
Give this help list.
--usage
Give a short usage message.
-V, --version
Print program version.
"OUTPUT OPTIONS"
-0, --null
Separate items by a null instead of a newline.
-c, --cu-only
Only list the CU names.
-v, --verbose
Increase verbosity of logging messages.
EXAMPLES
List all source files for a binary.
.SAMPLE
eu-srcfiles -e /
bin/
ls
.ESAMPLE
List all compilation units (CU) names for a given process (including shared libraries).
.SAMPLE
eu-srcfiles -c -p $$
.ESAMPLE
List source files of a binary based on its buildid, using debuginfod.
.SAMPLE
binary=`debuginfod-find executable 9c22d8d9e42bd051ffdc1064fdfd456ba781c629`
eu-srcfiles -c -e $binary
.ESAMPLE
Show the source code of the first CU of a shared library.
.SAMPLE
binary=/
usr/
lib64/
libc.so.6
srcfile=`eu-srcfiles -c -e $binary | head -1`
cat `debuginfod-find source $binary $srcfile`
.ESAMPLE
List the source files of a kernel image.
.SAMPLE
eu-srcfiles -e /
boot/
vmlinuz-`uname -r`
.ESAMPLE
"AUTHOR"
Written by Housam Alamour.
"REPORTING BUGS"
Please reports bugs at https://
sourceware.org/
bugzilla/
"COPYRIGHT"
Copyright (c) 2023 Red Hat Inc. License GPLv3+: GNU GPL version 3 or
later <https://
gnu.org/
licenses/
gpl.html>. This is free software: you
are free to change and redistribute it. There is NO WARRANTY, to the
extent permitted by law.