Re: on debugging loadable modules...

Michael K. Johnson (johnsonm@nigel.vnet.net)
Thu, 14 Mar 1996 12:16:47 -0500


lilo writes:
>On Thu, 14 Mar 1996, Michael K. Johnson wrote:
>> How about this simpler method: since insmod already has the ability
>> to produce a fixed-up symbol table on load, have its *default*
>> action be to write a file parallel to the module it loaded called
>> "<module-name>.symtab". Each time the module is loaded, a new
>> ...
>> Any opinions? Did I leave out anything important?
>
>I'd rather see modprobe do things like this. It's got a config file and you
>can plunk down a config option that specifies what directory this stuff goes
>in. For me, personally, somewhere in /var would make sense.
>
>Still, not everyone uses modprobe....maybe a command line option for insmod
>that specifies where the file will go? Something that modprobe can also
>drive via a config option.

You've got the wrong end of the stick, I think.

There should be a command-line option to insmod that tells it where
to put the symtab file, and modprobe could read its config file to
tell where to put it, but the *default* (as I was careful to emphasize
in my original post) would be to put it in a standard place -- right
next to the module that was loaded. That is simple and easy to find
and use. You can always do your own configuration with modprobe's
configuration file, if you don't like the default. But as you notice
in your second paragraph, not everyone uses modprobe, and if only
for that reason modprobe is the wrong place to put the base capability.
(I have other reasons, but they are aesthetic, so I won't bring them
up here.)

Since there is already a more-or-less defacto standard for where to
put modules, ksymoops would know where to look by default for the
symtab files by default, and if there's a command-line options that
allows you to specify it, both insmod and modprobe users will be
happy.

michaelkjohnson