"[Kernel] Kernel and module debugging with gdb"

What is a loadable module

#define __section(S)    __attribute__ ((__section__(#S)))
#define __init          __section(.init.text) __cold notrace
#define __initdata      __section(.init.data)
#define __exit          __section(.exit.text) __exitused __cold notrace
#define __exitdata      __section(.exit.data)

How to debug with gdb

References

[1] https://www.linux.com/learn/linux-training/33991-the-kernel-newbie-corner-kernel-and-module-debugging-with-gdb
[2] http://www.linux.com/learn/linux-training/32867-the-kernel-newbie-corner-whats-in-that-loadable-module-anyway