EU-SRCFILES(1)
π EU-SRCFILES(1) π
okay bestie, pull up a chair, this is eu-srcfiles from the elfutils manual (General Commands Manual section, iykyk) and she is so useful. let's get into it π«Ά
β¨ NAME β¨
eu-srcfiles β she lists the source files of a DWARF/ELF file. that's the whole job. that's her main character energy. π
β¨ SYNOPSIS β¨
eu-srcfiles [-0|--null] [-c|--cu-only] [-v|--verbose] [-z|--zip] INPUT
β¨ DESCRIPTION β¨
okay so here's the tea β β eu-srcfiles lists all the source files of a given DWARF/ELF file. that list comes from searching the DWARF debuginfo, and that debuginfo may get automatically fetched by debuginfod if applicable. no cap.
and like, the target file? it can be literally anything:
- an executable
- a coredump
- a process
- or even the running kernel π
the default input is the file a.out (yes, that a.out, the og).
the source file names get made unique by prepending the full path name, and then they're printed to standard output. and if you want, the source files can be placed in a zip file that gets sent to stdout. it's giving "here's your whole source tree in a zip" π
heads up bestie: all occurrences of/./and/../in the path name are canonicalized. so don't come for her about path weirdness, she already handled it β¨
β¨ INPUT OPTIONS β¨
the long and short forms of options, shown here as alternatives, are equivalent. fr fr, pick whichever one feels right in your heart π
--core=COREFILEβ find addresses from signatures found in COREFILE.--debuginfo-path=PATHβ search path for separate debuginfo files. that's where she goes looking for the goods.- *
-e*FILE,--executable=FILE β find addresses in FILE. -k,--kernelβ find addresses in the running kernel. yes, the actual live kernel, she's not scared π§-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/mapsformat. - *
-p*PID,--pid=PID β find addresses in files mapped into process PID. -?,--helpβ give this help list. she will simply tell you the options.--usageβ give a short usage message.-V,--versionβ print program version.
β¨ OUTPUT OPTIONS β¨
-0,--nullβ separate items by a null instead of a newline. for when newlines are simply not the vibe.-b,--no-backupβ disables local source file search when debuginfod fails to fetch files. β οΈ this option is only applicable when fetching and zipping files. so don't expect it to do anything in other situations, bestie.-c,--cu-onlyβ only list the CU (compilation unit) names. short and sweet, love that for her π-v,--verboseβ increase verbosity of logging messages. more lore, more logging.-z,--zipβ 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 β so yeah, missing is missing, no magic π
β¨ EXAMPLES β¨
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
β¨ AUTHOR β¨
written by Housam Alamour. ty king π«Ά
β¨ REPORTING BUGS β¨
please reports bugs at https://sourceware.org/bugzilla/ β be nice about it, it's giving constructive π
β¨ 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. periodt. π₯
and that's the whole page, bestie!! π this one is from elfutils, dated 2023-Sept-25, and yeah, EU-SRCFILES(1) ate and left no crumbs. go list some source files, you got this πΈπ¦
π¦ where this page comes from
- alpine 3.22: elfutils-doc 0.193-r0 Β· GPL-3.0-or-later AND ( GPL-2.0-or-later OR LGPL-3.0-or-later )
- alpine 3.23: elfutils-doc 0.194-r0 Β· GPL-3.0-or-later AND ( GPL-2.0-or-later OR LGPL-3.0-or-later )
- alpine 3.24: elfutils-doc 0.195-r0 Β· GPL-3.0-or-later AND ( GPL-2.0-or-later OR LGPL-3.0-or-later )
- arch rolling: elfutils 0.196-1
- arch rolling: elfutils 0.197-1 Β· GPL-3.0-or-later
- centos-stream 10: elfutils 0.197-1.el10 Β· GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GFDL-1.3-no-invariants-or-later
- centos-stream 9: elfutils 0.197-1.el9 Β· GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GFDL-1.3-no-invariants-or-later
- debian trixie: elfutils 0.192-4 Β· GPL-3.0-or-later
- fedora 43: elfutils 0.193-3.fc43 Β· GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GFDL-1.3-no-invariants-or-later
- fedora 43: elfutils 0.196-1.fc43
- fedora 43: elfutils 0.197-1.fc43 Β· GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GFDL-1.3-no-invariants-or-later
- fedora 44: elfutils 0.194-5.fc44 Β· GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GFDL-1.3-no-invariants-or-later
- fedora 44: elfutils 0.196-1.fc44
- fedora 44: elfutils 0.197-1.fc44 Β· GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GFDL-1.3-no-invariants-or-later
- nixos 26.05: elfutils 0.194
- nixpkgs unstable: elfutils 0.195
- opensuse-leap 16.0: elfutils 0.192-160000.3.1 Β· GPL-3.0-or-later
- opensuse-leap 16.0: elfutils 0.192-160000.3.1 Β· GPL-3.0-or-later
- opensuse-leap 16.0: elfutils 0.192-160000.3.1 Β· GPL-3.0-or-later
- opensuse-leap 16.0: elfutils 0.192-160000.3.1 Β· GPL-3.0-or-later
- ubuntu questing: elfutils 0.193-1
- ubuntu resolute: elfutils 0.194-4 Β· GPL-3.0-or-later
- ubuntu stonking: elfutils 0.196-1 Β· GPL-3.0-or-later
- Copyright 2023 Red Hat Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms