This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Location of vmlinux debuginfo file
- From: Roland McGrath <roland at redhat dot com>
- To: Mike Mason <mmlnx at us dot ibm dot com>
- Cc: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>, "Frank Ch. Eigler" <fche at redhat dot com>, SystemTAP <systemtap at sources dot redhat dot com>
- Date: Mon, 14 Aug 2006 17:50:57 -0700 (PDT)
- Subject: Re: Location of vmlinux debuginfo file
> I was wrong in my original email. SLES puts vmlinux-`uname -r`.debug in
> /usr/lib/debug/boot. If I create a link from that file to
> /usr/lib/debug/boot/vmlinux-`uname -r` it works.
Ah. But there is no file called /boot/vmlinux-`uname -r`.
> I'm not seeing where it ever tries to open a corresponding
> /usr/lib/debug/boot/vmlinux-`uname -r`.debug file.
It doesn't. If /boot/vmlinux-`uname -r` existed and was an ELF file
containing a .gnu.debuglink section giving the name vmlinux-`uname -r`.debug,
then it would look for a /usr/lib/debug/boot/vmlinux-`uname -r`.debug file.
The standard debuginfo-finding behavior is based on starting with a
stripped ELF file that the debuginfo corresponds to. Given that there
isn't any such file for the kernel in many setups, it is certainly
reasonable to look for /usr/lib/debug/boot/vmlinux-`uname -r`.debug as a
special case (at least as reasonable as looking for
/usr/lib/debug/boot/vmlinux-`uname -r`).
> I also see various attempts to open files in a .debug subdirectory.
> Is that a standard place for debuginfo files?
The default debuginfo_path is ":.debug:/usr/lib/debug".
The libdwfl.h comments on dwfl_standard_find_debuginfo describe what the
path setting means:
/* Standard find_debuginfo callback function.
This is controlled by a string specifying directories to look in.
If `debuginfo_path' is set in the Dwfl_Callbacks structure
and the char * it points to is not null, that supplies the string.
Otherwise a default path is used.
If the first character of the string is + or - that says to check or to
ignore (respectively) the CRC32 checksum from the .gnu_debuglink
section. The default is to check it. The remainder of the string is
composed of elements separated by colons. Each element can start with +
or - to override the global checksum behavior. If the remainder of the
element is empty, the directory containing the main file is tried; if
it's an absolute path name, the absolute directory path containing the
main file is taken as a subdirectory of this path; a relative path name
is taken as a subdirectory of the directory containing the main file.
Hence for /bin/ls, string ":.debug:/usr/lib/debug" says to look in /bin,
then /bin/.debug, then /usr/lib/debug/bin, for the file name in the
.gnu_debuglink section (or "ls.debug" if none was found). */