public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* Using BDI2000 for module debugging
@ 2001-11-23  5:13 Rudolf Ladyzhenskii
  2001-11-26 19:27 ` Frank Rowand
  0 siblings, 1 reply; 2+ messages in thread
From: Rudolf Ladyzhenskii @ 2001-11-23  5:13 UTC (permalink / raw)
  To: Linuxppc-Embedded (E-mail)


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.

Thanks,

/************************/
Rudolf Ladyzhenskii
DSP Engineer
Advanced Communication Technologies
ph.  +61 3 8080 8215
fax. +61 3 9672 8800
Level 9, 190 Queen Street,
Melbourne, 3000
Australia
/***********************/


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Using BDI2000 for module debugging
  2001-11-23  5:13 Using BDI2000 for module debugging Rudolf Ladyzhenskii
@ 2001-11-26 19:27 ` Frank Rowand
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Rowand @ 2001-11-26 19:27 UTC (permalink / raw)
  To: Rudolf Ladyzhenskii; +Cc: Linuxppc-Embedded (E-mail)


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.  */
        put_mod_name(n_name);
        put_mod_name(name);

        /* Initialize the module.  */
        mod->flags |= MOD_INITIALIZING;
        atomic_set(&mod->uc.usecount,1);


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


        if (mod->init && (error = mod->init()) != 0) {
                atomic_set(&mod->uc.usecount,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
--
Frank Rowand <frank_rowand@mvista•com>
MontaVista Software, Inc

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-11-26 19:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-23  5:13 Using BDI2000 for module debugging Rudolf Ladyzhenskii
2001-11-26 19:27 ` Frank Rowand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox