Hi, Are you saying your system hangs when it executed BUG()? Don't you get a 'Oops' message when your module_init is called? The only way I know of attaching to the kernel when it hits a BUG() is through a debugger like kgdb. For this to work, your kernel should have been compiled with the debugger code. You an find kgdb at http://kgdb.sourceforge.net. -Ravi. --- J Pradeep <pradeep@it.iitb.ac.in> wrote: > > Hi Guys, > I just wrote a module to test this. I put a BUG > in the module_init > function. My code has a usage count of 1 on lsmod > and hence it is not > being unloaded. Is there a way of attaching to this > hanging code and tweek > around my running code ? If yes, please let me know > how ? > __________________________________________________ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ IRC Channel: irc.openprojects.net / #kernelnewbies Web Page: http://www.kernelnewbies.org/