1EU-SRCFILES(1)              General Commands Manual             EU-SRCFILES(1)
2
3
4

NAME

6       eu-srcfiles - Lists the source files of a DWARF/ELF file.
7
8

SYNOPSIS

10       eu-srcfiles [-0|--null] [-c|--cu-only] [-v|--verbose] INPUT
11
12

DESCRIPTION

14       eu-srcfiles  lists the source files of a given ARF/ELF file.  This list
15       is based on a search of the DWARF debuginfo, which may be automatically
16       fetched  by  debuginfod  if applicable.  The target file may be an exe‐
17       cutable, a coredump, a process, or even the running  kernel.   The  de‐
18       fault  is  the file 'a.out'.  The source file names are made unique and
19       printed to standard output.
20
21

INPUT OPTIONS

23       The long and short forms of options, shown here  as  alternatives,  are
24       equivalent.
25
26       --core=COREFILE
27              Find addresses from signatures found in COREFILE.
28
29
30       --debuginfo-path=PATH
31              Search path for separate debuginfo files.
32
33
34       -e FILE, --executable=FILE
35              Find addresses in FILE.
36
37
38       -k, --kernel
39              Find addresses in the running kernel.
40
41
42       -K, --offline-kernel[=RELEASE]
43              Kernel with all modules.
44
45
46       -M FILE, --linux-process-map=FILE
47              Find  addresses  in  files  mapped  as  read  from FILE in Linux
48              /proc/PID/maps format.
49
50
51       -p PID, --pid=PID
52              Find addresses in files mapped into process PID.
53
54
55       -?, --help
56              Give this help list.
57
58
59       --usage
60              Give a short usage message.
61
62
63       -V, --version
64              Print program version.
65
66

OUTPUT OPTIONS

68       -0, --null
69              Separate items by a null instead of a newline.
70
71
72       -c, --cu-only
73              Only list the CU names.
74
75
76       -v, --verbose
77              Increase verbosity of logging messages.
78
79
80

EXAMPLES

82       List all source files for a binary.
83       eu-srcfiles -e /bin/ls
84
85       List all compilation units (CU) names for a  given  process  (including
86       shared libraries).
87       eu-srcfiles -c -p $$
88
89       List source files of a binary based on its buildid, using debuginfod.
90       binary=`debuginfod-find executable 9c22d8d9e42bd051ffdc1064fdfd456ba781c629`
91       eu-srcfiles -c -e $binary
92
93       Show the source code of the first CU of a shared library.
94       binary=/usr/lib64/libc.so.6
95       srcfile=`eu-srcfiles -c -e $binary | head -1`
96       cat `debuginfod-find source $binary $srcfile`
97
98       List the source files of a kernel image.
99       eu-srcfiles -e /boot/vmlinuz-`uname -r`
100
101
102

AUTHOR

104       Written by Housam Alamour.
105
106

REPORTING BUGS

108       Please reports bugs at https://sourceware.org/bugzilla/
109
110
112       Copyright  (c)  2023 Red Hat Inc.  License GPLv3+: GNU GPL version 3 or
113       later <https://gnu.org/licenses/gpl.html>.  This is free software:  you
114       are  free  to change and redistribute it.  There is NO WARRANTY, to the
115       extent permitted by law.
116
117
118
119elfutils                         2023-Sept-25                   EU-SRCFILES(1)
Impressum