debugging a module
Marc Esipovich
marc at corky.net
Mon Sep 4 12:55:16 PDT 2000
Hi,
> I have some problems with a module I am developing on linux 2.2.12 .
> Now I want to set some breakpoints and debug the program. I have used kdb
> on the kernel. But I don't know how can I use kdb to debug a module added
> using insmod.
You use kdb on a kernel module exactly the same way you would use it on the
live kernel, when the module is loaded, you can use kdb to break on
any function in your module which has its symbol exported.
You can also put an 'int 3' instruction exactly where you need to break,
use something like the following macro:
#define DEBUGBREAK __asm__ __volatile__ ("int3");
bye,
Marc.
--
marc @ corky.net
fingerprint = D1F0 5689 967F B87A 98EB C64D 256A D6BF 80DE 6D3C
/"\
\ / ASCII Ribbon Campaign
X Against HTML Mail
/ \
More information about the kdb
mailing list