lkcd
[Top] [All Lists]

Re: module traceback working

To: Dave Craft <dcraft@xxxxxxxxxxxxxx>
Subject: Re: module traceback working
From: Keith Owens <kaos@xxxxxxxxxx>
Date: Fri, 26 Jan 2001 11:47:05 +1100
Cc: lkcd@xxxxxxxxxxx
In-reply-to: Your message of "Thu, 25 Jan 2001 15:57:30 MDT." <200101252157.PAA18134@xxxxxxxxxxxxxxxxxxxx>
Sender: owner-lkcd@xxxxxxxxxxx
On Thu, 25 Jan 2001 15:57:30 -0600 (CST), 
Dave Craft <dcraft@xxxxxxxxxxxxxx> wrote:
>After you fix this in lcrash you have to run it with a System.map
>that has the additional symbols from your module.  You can get your
>modules symbol table at load time by using the -m option on insmod.
>Note you have to strip out all the extraneous stuff out of this map.
>
>  cat <module>.map | awk '/ [TtDd] / {print $0}' >> tmp.map
>
>Then append this to a new COPY of the /boot/System.map and do
>(sort -u) on the file.   You can give lcrash this file as an 
>option or just link /boot/System.map to your new symbol file.

insmod -m is not reliable.  There is no corresponding hook for removing
a symbol table when a module is removed.  Using insmod -m is a manual
process, you have to set that option on every insmod and merge all the
module symbols together.

There is a much better method, just create /var/log/ksymoops and both
insmod and rmmod will automatically save /proc/ksyms after load and
unload.  This log is intended for ksymoops which has exactly the same
problems as lkcd, but the log can obviously be used for any kernel
debugger.  man insmod, see ksymoops assistance.  modutils 2.4.2 adds a
log file for modprobe commands so you can track the commands the kernel
issued, this also uses /var/log/ksymoops.


<Prev in Thread] Current Thread [Next in Thread>