[Crash-utility] crash version 4.0-4.4 is available

Dave Anderson anderson at redhat.com
Mon Jul 23 14:09:37 UTC 2007


Bernhard Walle wrote:
> Hi,
> 
> * Dave Anderson <anderson at redhat.com> [2007-07-20 21:42]:
> 
>>- Implemented support for the use of "kerntypes" debuginfo files that
>>  are created by the LKCD "dwarfextract" utility, as an alternative to
>>  the use of the vmlinux file.  This requires the use of the matching
>>  System.map file, as in this example:
>>
>>    # crash kerntypes System.map [vmcore]
>>
>>  This capability was written by Cliff Wickman of SGI, and he has
>>  generously offered to maintain its functionality.  (cpw at sgi.com)
> 
> 
> Hm ..., I like the feature, but it doesn't work here (x86_64,
> 2.6.22.1). I just compiled the kernel with debugging information (-g),
> then
> 
>     dwarfextract -p -s vmlinux Kerntypes
> 
> and now 
> 
>     crash -s /boot/System.map-2.6.22.1-default Kerntypes
>     WARNING: cannot determine pgdat list for this kernel/architecture
> 
>     crash> p jiffies
>     p: gdb request failed: p jiffies
> 
> Am I doing sth. wrong here? With
> 
>     crash -s /boot/System.map-2.6.22.1-default vmlinux
> 
> everything works flawlessly.

And this is why I coerced Cliff into the support of this venture...  ;-)

Anyway, Cliff and I went back-and-forth through several patch
submissions, and one of the things that I did insist upon was
that the Kerntypes-specific code be totally segregated from the
"traditional" code.  (You can see a number of "LKCD_KERNTYPES()"
checks that do just that.)  But that's why the vmlinux file usage
still should work "flawlessly"...

My guess is that Cliff was using an older kernel that was able
to either use the "if" block of this if-else statement, or that
either next_online_node() or next_online_pgdat() worked OK:

                  *  This order may have to change based upon architecture...
                  */
                 if (symbol_exists("pgdat_list") &&
                     (VALID_MEMBER(pglist_data_node_next) ||
                      VALID_MEMBER(pglist_data_pgdat_next))) {
                         get_symbol_data("pgdat_list", sizeof(void *), &pgdat);
                         vt->flags &= ~NODES_ONLINE;
                 } else if (vt->flags & NODES_ONLINE) {
                         if ((node = next_online_node(0)) < 0) {
                                 error(WARNING,
                         "cannot determine first node from node_online_map\n\n");
                                 return;
                         }
                         if (!(pgdat = next_online_pgdat(node))) {
                                 error(WARNING,
                 "cannot determine pgdat list for this kernel/architecture\n\n");
                                 return;
                         }
                 }

I guess I'd work back from there -- figure out what it does "right"
when you use the vmlinux, and determine why it doesn't take that
path when using the kerntypes file.

But as to why the "p jiffies" failed, I'm sure I don't understand
why that doesn't work?

Cliff -- correct me if I'm wrong -- simple gdb commands against a
kerntypes file should work OK, correct?

Dave



> 
> Thanks,
>    Bernhard
> 
> PS: I compiled dwarfextract with the patches from lkcdutils
> (https://lkcd.svn.sourceforge.net/svnroot/lkcd/trunk/lkcdutils/PATCHES/)
> applied to libdwarf from http://reality.sgiweb.org/davea/dwarf.html
> (latest version).
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility





More information about the Crash-utility mailing list