Re: Module debugging

Henner Eisen (
27 Nov 1997 22:38:23 +0100


"Andrew E. Mileski" <> writes:

> > is it possible to debug loadable kernel module ?
> I do all my development with them.
> It helps to printk the addresses of a few routines.
> Then compare these againt the module object.

Why not just using the "-m" option when insmoding the modules in question?

I.e. I use a script that loads the modules like

insmod -m isdn > /var/modules/
insmod -m x25 > /var/modules/

# ..
# and after all modules are loaded ...

# create a suitable for ksymoops and alike that contains symbols
# of resident kernel as well as of all currently loaded modules

cat $KERNEL_ROOT/ > /tmp/
for i in `cat /proc/modules | sed 's/ .*$//'`
grep '^c' < /var/modules/$ | sed "s/$/@$i/"
done | sort >> /tmp/

(might be improvable but works well for me). In case of an oops just
let ksymoops use that /tmp/ file.