<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Olaf Hering wrote:
<blockquote TYPE=CITE>On Wed, Nov 08, Dave Anderson wrote:
<p>> Olaf Hering wrote:
<br>>
<br>> > crash 4.0-3.9 can not read a dump file from an ia64 box running
2.6.5.
<br>> > Is this supposed to work?
<br>> >
<br>> > crash -s  boot/System.map-2.6.5-7.267-sn2 boot/Kerntypes-2.6.5-7.267-sn2
dump.3
<br>>
<br>> Well, if it did work, it would be news to me.  I've certainly
never run crash
<br>> with a "Kerntypes" file as a substitute for a -g built vmlinux file.
<p>Thats all we have right now. And sadly, I have been told that gcc will
<br>generate different asm depending on what host the kernel is compiled
<br>(memory config etc.). So getting the exact vmlinux again may be a
<br>challenge with gcc3.2.</blockquote>
<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><tt></tt>
<p><tt> # crash vmlinux-rebuilt-with-g System.map-of-dumped-vmlinux
dumpfile</tt><tt></tt>
<p><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>What happens when you use a System.map command line argument is
this:</tt><tt></tt>
<p><tt>1. crash passes its embedded gdb the vmlinux-rebuilt-with-g file,</tt>
<br><tt>   which will most likely have many of its text addresses,
and probably</tt>
<br><tt>   all of its data addresses "shifted" up, and therefore
be incorrect.</tt>
<br><tt>   (But the data structure definitions, etc., are correct...)</tt><tt></tt>
<p><tt>2. After that, crash takes the System.map file, which contains a</tt>
<br><tt>   list of the *correct* symbol values, goes in a back-door
into gdb,</tt>
<br><tt>   and overwrites gdb's symbol list values with the correct
values.</tt>
<br><tt>   That's what's happening when you see that init-time
message:</tt><tt></tt>
<p><tt>   please wait... (patching 20920 gdb minimal_symbol values)</tt><tt></tt>
<p><tt>We had to do that for RHEL 2.1, which at the time did not have a</tt>
<br><tt>kernel debuginfo package, so we always had to rebuild specific</tt>
<br><tt>kernel versions with -g for crash sessions.  With RHEL3 and
beyond,</tt>
<br><tt>the -g built vmlinux is part of each kernel's debuginfo package,</tt>
<br><tt>so from that point on, there has never been a need to use a</tt>
<br><tt>System.map file.</tt><tt></tt>
<p><tt>Dave</tt>
<br> </html>