[kwlug-disc] why, yes, you *can* help me write my next column, thanks for asking

Robert P. J. Day rpjday at crashcourse.ca
Fri Jul 31 08:58:23 EDT 2009


  i figured my next kernel newbie column would be on using stock "gdb"
to debug a running kernel, pretty much the way it's explained in LDD3,
chapter 4:

  http://lwn.net/Kernel/LDD3/

with a few extra goodies thrown in, but the more i thought about it,
the more i realized that i needed to lay the foundations by at least
explaining the layout of a newly-built kernel in terms of its ELF
layout, and its sections, and how to look at it with, say, nm or
objdump and that's turning into an entire column all by itself.

  so, any suggestions as to what you've personally found useful along
those lines in examining a stock "vmlinux" kernel image with similar
commands?  i'd start with building a kernel with DEBUG_INFO selected,
then

  $ objdump --section-headers vmlinux

then more objdump to examine the symbol table, perhaps in specific
sections, and show how those sections match up against the contents of
<linux/init.h> where they're defined, etc, etc.

  possibly a bit dry, but the more i think about it, the more i think
it will be handy to cover all that now as i'm pretty sure i can use it
later.  certainly in the next column when i cover "gdb" for both the
kernel and loadable modules.

  thoughts?

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
"Kernel Newbie Corner" column @ linux.com:          http://cli.gs/WG6WYX
========================================================================



More information about the kwlug-disc_kwlug.org mailing list