EU-SRCFILES(1) | General Commands Manual | EU-SRCFILES(1) |
eu-srcfiles - Lists the source files of a DWARF/ELF file.
eu-srcfiles [-0|--null] [-c|--cu-only] [-v|--verbose] [-z|--zip] INPUT
eu-srcfiles 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 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.
The long and short forms of options, shown here as alternatives, are equivalent.
List all source files for a binary.
eu-srcfiles -e /bin/ls
List all compilation units (CU) names for a given process
(including shared libraries).
eu-srcfiles -c -p $$
List source files of a binary based on its buildid, using
debuginfod.
binary=`debuginfod-find executable 9c22d8d9e42bd051ffdc1064fdfd456ba781c629` eu-srcfiles -c -e $binary
Show the source code of the first CU of a shared library.
binary=/usr/lib64/libc.so.6 srcfile=`eu-srcfiles -c -e $binary | head -1` cat `debuginfod-find source $binary $srcfile`
List the source files of a kernel image.
eu-srcfiles -e /boot/vmlinuz-`uname -r`
Zip all the source files for a binary.
eu-srcfiles -z -e /bin/ls > ls.zip
Written by Housam Alamour.
Please reports bugs at https://sourceware.org/bugzilla/
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.
2023-Sept-25 | elfutils |