Using BDI2000 for module debugging

Frank Rowand frank_rowand at
Tue Nov 27 06:27:23 EST 2001

Rudolf Ladyzhenskii wrote:
> Hi, all
> I have a particular module that crashes the system during installation.
> What is the best way to use BDI2000 to stop on the first instruction of the
> init_module()?
> I can do kernel debugging with BDI2000, but I am not sure how to get to the
> dynamically loaded modules.

This info was correct for 2.4.2, I don't know if it is still correct.  I
used this method for KGDB, but it should work for the BDI2000 too.

Set a breakpoint in sys_init_module() at a place after the module has
been loaded, but before the init routine has been called.  Here's
where I did it in 2.4.2:

        /* Free our temporary memory.  */

        /* Initialize the module.  */
        mod->flags |= MOD_INITIALIZING;

breakpoint here, before the "mod->init()"....

        if (mod->init && (error = mod->init()) != 0) {
                mod->flags &= ~MOD_INITIALIZING;
                if (error > 0)  /* Buggy module */
                        error = -EBUSY;
                goto err0;

>From the breakpoint in sys_init_module(), you can set a breakpoint in
the module's init_module()

Frank Rowand <frank_rowand at>
MontaVista Software, Inc

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list