<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<tt>Bernhard Walle wrote:</tt>
<blockquote TYPE=CITE><tt>Hello,</tt><tt></tt>
<p><tt>* Dave Anderson <anderson@redhat.com> [2006-11-08 22:26]:</tt>
<br><tt>> Olaf Hering wrote:</tt>
<br><tt>> > On Wed, Nov 08, Dave Anderson wrote:</tt>
<br><tt>> > > Olaf Hering wrote:</tt>
<br><tt>> > ></tt>
<br><tt>> > > > crash 4.0-3.9 can not read a dump file from an ia64 box
running 2.6.5.</tt>
<br><tt>> > > > Is this supposed to work?</tt>
<br><tt>> > > ></tt>
<br><tt>> > > > crash -s  boot/System.map-2.6.5-7.267-sn2 boot/Kerntypes-2.6.5-7.267-sn2
dump.3</tt>
<br><tt>> > ></tt>
<br><tt>> > > Well, if it did work, it would be news to me.  I've
certainly never run crash</tt>
<br><tt>> > > with a "Kerntypes" file as a substitute for a -g built vmlinux
file.</tt>
<br><tt>> ></tt>
<br><tt>> > Thats all we have right now. And sadly, I have been told that
gcc will</tt>
<br><tt>> > generate different asm depending on what host the kernel is
compiled</tt>
<br><tt>> > (memory config etc.). So getting the exact vmlinux again may
be a</tt>
<br><tt>> > challenge with gcc3.2.</tt>
<br><tt>></tt>
<br><tt>> Well, that's always been the case, and that's OK.  In that
case,</tt>
<br><tt>> all you have to do is compile the identical kernel source code</tt>
<br><tt>> with -g, but also pass the System.map file of the "real" dumped</tt>
<br><tt>> vmlinux on the command line, as in:</tt>
<br><tt>></tt>
<br><tt>>  # crash vmlinux-rebuilt-with-g System.map-of-dumped-vmlinux
dumpfile</tt>
<br><tt>></tt>
<br><tt>> That's the sole purpose of the System.map argument, which should</tt>
<br><tt>> *only* be used in such a case.</tt><tt></tt>
<p><tt>I get this output here:</tt><tt></tt>
<p><tt>     # crash ./vmlinux-2.6.5-7.282-debug map.4
dump.4</tt><tt></tt>
<p><tt>    crash 4.0-53.1</tt>
<br><tt>    Copyright (C) 2002, 2003, 2004, 2005, 2006 
Red Hat, Inc.</tt>
<br><tt>    Copyright (C) 2004, 2005, 2006  IBM Corporation</tt>
<br><tt>    Copyright (C) 1999-2006  Hewlett-Packard
Co</tt>
<br><tt>    Copyright (C) 2005  Fujitsu Limited</tt>
<br><tt>    Copyright (C) 2005  NEC Corporation</tt>
<br><tt>    Copyright (C) 1999, 2002  Silicon Graphics,
Inc.</tt>
<br><tt>    Copyright (C) 1999, 2000, 2001, 2002  Mission
Critical Linux, Inc.</tt>
<br><tt>    This program is free software, covered by the
GNU General Public License,</tt>
<br><tt>    and you are welcome to change it and/or distribute
copies of it under</tt>
<br><tt>    certain conditions.  Enter "help copying"
to see the conditions.</tt>
<br><tt>    This program has absolutely no warranty. 
Enter "help warranty" for details.</tt><tt></tt>
<p><tt>    crash: map.4: not a supported file format</tt><tt></tt>
<p><tt>    Usage:</tt>
<br><tt>      crash [-h [opt]][-v][-s][-i file][-d
num] [-S] [mapfile] [namelist] [dumpfile]</tt><tt></tt>
<p><tt>    Enter "crash -h" for details.</tt><tt></tt>
<p><tt>./vmlinux-2.6.5-7.282-debug is a uncompressed kernel image without</tt>
<br><tt>debug information (IA 64), map.4 is a normal System.map file and</tt>
<br><tt>dump.4 is the LKCD dump file.</tt>
<br><tt></tt> </blockquote>
<tt>"vmlinux-2.6.5-7.282-debug" must have debug information right? 
Crash</tt>
<br><tt>will not work without at least one debug-full vmlinux file on the
command</tt>
<br><tt>line, and since it works without the map.4, it must be debug-full.</tt>
<blockquote TYPE=CITE><tt></tt> 
<br><tt>Without the map.4 argument, crash doesn't complain about the file</tt>
<br><tt>formats.</tt></blockquote>
<tt>...but the virtual addresses probably don't line up completely?</tt>
<blockquote TYPE=CITE><tt></tt> <tt></tt>
<p><tt>Any hints? Thanks!</tt>
<br><tt></tt> </blockquote>
<tt>Yes, the "map.4" file did not return successfully from the</tt>
<br><tt>is_system_map() function in symbols.c.  That function sanity-checks</tt>
<br><tt>the first 100 entries in the file to verify that there are 3 entries</tt>
<br><tt>in each line, that the the first entry contains a 64-bit hexadecimal</tt>
<br><tt>address, and that the second field contains a single character.</tt><tt></tt>
<p><tt>For example, this is an example of a 2.4 ia64 kernel</tt>
<br><tt>System.map file:</tt><tt></tt>
<p><tt>#  head /boot/System.map</tt>
<br><tt>0000000004407f20 A phys_start</tt>
<br><tt>e000000000000000 A v</tt>
<br><tt>e000000004400000 A _stext</tt>
<br><tt>e000000004400000 A _text</tt>
<br><tt>e000000004400000 T ia64_ivt</tt>
<br><tt>e000000004400000 t vhpt_miss</tt>
<br><tt>e000000004400400 t itlb_miss</tt>
<br><tt>e000000004400410 t itlb_fault</tt>
<br><tt>e000000004400800 t dtlb_miss</tt>
<br><tt>e000000004400810 t dtlb_fault</tt>
<br><tt>#</tt><tt></tt>
<p><tt>What does "head -100 map.4." show?</tt><tt></tt>
<p><tt>Dave</tt>
<br> </html>