Re: crash cannot read the symbols

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
> Hi Everyone,
> 
> I am just trying load a kernel and System.map file into crash.
> 
> crash vmlinux System.map
> 
> I get:
> 
> crash 5.1.7
> Copyright (C) 2002-2011 Red Hat, Inc.
> Copyright (C) 2004, 2005, 2006 IBM Corporation
> Copyright (C) 1999-2006 Hewlett-Packard Co
> Copyright (C) 2005, 2006 Fujitsu Limited
> Copyright (C) 2006, 2007 VA Linux Systems Japan K.K.
> Copyright (C) 2005 NEC Corporation
> Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc.
> Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
> This program is free software, covered by the GNU General Public
> License, and you are welcome to change it and/or distribute copies of it under
> certain conditions. Enter "help copying" to see the conditions.
> This program has absolutely no warranty. Enter "help warranty" for
> details.
> 
> GNU gdb (GDB) 7.0
> Copyright (C) 2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://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. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu"...
> 
> crash: vmlinux: no debugging data available
> 
> However, the System.map file reads fine and “nm vmlinux” shows the
> symbols as well.
> 
> A side note that this is a linux 2.4 kernel.
> Is linux 2.4 not supported or what am I doing wrong?

Linux 2.4 is supported, but either the vmlinux file was not originally
built with the -g CFLAG, or it had the debuginfo data stripped.
Without the debuginfo data, the vmlinux is useless.

If by chance it is a RHEL3 2-4-based kernel, there is an associated
vmlinux.debug file that comes with the separate kernel-debuginfo rpm
package, so for example, you'd end up with two files:

   vmlinux-2.4.21-47.EL and vmlinux-2.4.21-47.EL.debug

that would be installed here:

   /boot/vmlinux-2.4.21-47.EL
   /usr/lib/debug/boot/vmlinux-2.4.21-47.EL.debug

If the files are found in locations above, running on a live system
they would be found automatically when you enter:

   $ crash 

Alternatively you could just throw both files on the command line:

   $ crash <path-to>/vmlinux-2.4.21-47.EL <path-to>/vmlinux-2.4.21-47.EL.debug

That all being said, since you are trying "crash vmlinux" I'm guessing
that you are using a vmlinux file from another distro, or perhaps 
building your own kernel.  

If building your own kernel, the CFLAGS in the top-level Makefile needs
to contain -g.  In linux 2.4, I don't believe that there was a CONFIG_DEBUG_INFO
option that could be configured to do it automatically, so you may have to
change it manually, and then rebuild the kernel.  Presuming that the original
kernel that you're trying to analyze was booted from the same kernel version but
was not built with -g, then you would also have to put the System.map
file from the original kernel on the command line as you have done.

If the vmlinux file is from another distro, mention that, and perhaps
someone from the list can help.

Dave

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility



[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux