[Dwarf-discuss] Application of DWARF to kernel analysis

Chris Quenelle Chris.Quenelle
Mon Nov 14 19:37:13 GMT 2005

Hi Dave,

This is exciting.  At Sun, the kernel group has invented their own
C-structure-describing debug format (called CTF) and they
go through the same process of merging CTF type information.
I've been trying to find time to implement something like
that for dwarf, and now it seems that someone else has the same

It looks like it's based on applying a bunch of patch diffs
to a specific version of the libdwarf source tar file.
Isn't that going to be an ongoing maintenance issue
for them?


David Anderson wrote:
> There is a new application of DWARF2 and I thought folks
> on this list would be interested in hearing about it.
> It recently moved to SourceForge where all can use it.
> Cliff Wickman provided this summary at my request.
> David Anderson,  davea at sgi dot com
> -------------
>                         Converting DWARF to DWARF
>   Debugging the Linux kernel presents a need for thousands of kernel
>   structure definitions.  But it is not possible to compile all the kernel
>   include files at once.  So how do you collect all kernel structures?
>   Someone in an SGI class once asked then-instructor Cliff Wickman 
>   why we cannot compile the kernel and its modules with -g and then
>   collect all their DWARF information into one file.  The answer was
>   that we have no such tool.
>   Hence the idea for dwarfextract.
>   The program uses the DWARF consuming library routines to extract the
>   types. It eliminates duplicates.  Then turns around and feeds them to
>   the DWARF producing routines.  It creates a "kerntypes" file that looks
>   like an ELF binary but contains nothing but DWARF information.
>   This kerntypes file is used by the lcrash kernel debugger to
>   cast memory images as any kernel type.
>   The dwarfextract tool is part of the Linux Kernel Crash Dump (LKCD)
>   project.  The project can be downloaded from sourceforge by:
>     export CVSROOT=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/lkcd"
>     cvs login    # Press enter (eg no password) when prompted
>     cvs -z3 co lkcd/7.X.X/lkcdutils
>     cd lkcd/7.X.X/lkcdutils ; ./configure
> -------------
> _______________________________________________
> Dwarf-discuss mailing list
> Dwarf-discuss at freestandards.org
> http://mail.freestandards.org/mailman/listinfo/dwarf-discuss

More information about the Dwarf-discuss mailing list