[Dwarf-discuss] Application of DWARF to kernel analysis

David Anderson davea
Thu Nov 10 13:11:36 GMT 2005


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
-------------



More information about the Dwarf-discuss mailing list