Re: how to debug my won kernel module?



google-rambo88 coughed up some electrons that declared:

hi,
I'd like to know how to debug my won kernel module?

gdb is working for my own kernel module?

Thanks.

Sorry, don't know - but you should probably try google on:

debugging linux kernel

IIRC the kernel debugger needs to be patched in, ie it's not a standard part
of the source any more.

You could also get "old skool" and use lots of printk()'s - it may be
sufficient for you.

Cheers

Tim
.



Relevant Pages

  • Re: [PATCH 3/8] kgdb, modules: Always allow module sect info for KGDB
    ... With more information in the kernel, gdb can be modified in such a way ... allow for easy kernel module debugging. ... you'd want to build KGDB without KALLSYMS? ...
    (Linux-Kernel)
  • [PATCH 3/8] kgdb, modules: Always allow module sect info for KGDB
    ... With more information in the kernel, gdb can be modified in such a way ... allow for easy kernel module debugging. ... #ifdef CONFIG_MODULE_FORCE_UNLOAD ...
    (Linux-Kernel)
  • Using gdb for kernel module post mortem
    ... view the source for the kernel module and it seems to know the correct ... My problem is when I try to get the disassembly gdb can't find the ... I can disassemble a function build into the kernel just fine ... using kgdb to connect to a live device and presumably getting the full ...
    (comp.os.linux.embedded)
  • Re: [opensuse] Re: How to unload kernel module?
    ... I'd like to debug a kernel module. ... I want to unload the ... module that was loaded at boot. ...
    (SuSE)
  • appending to CFLAGS
    ... I'm trying to debug a kernel module that used to work, ... because my syntax results in VPO_DEBUG replacing CFLAGS, ... whitespace separating tokens, no whitespace. ...
    (freebsd-questions)