Linux – Debugging info in linux kernel – how does it work

debuggingkernellinux

I have found that I can compile linux kernel with some flags adding debugging support like CONFIG_DEBUG_INFO. These options while useful in debugging are also required by some utilities like SystemTap.

I was using SystemTap because it allowed me to get all syscalls from whole system (and won't hang it like tracing all processes using strace did).

I was wondering how these information are read from kernel (in the way that is not causing so big overhead).

Best Answer

CONFIG_DEBUG_INFO is about building kernel with debugging symbols (for gdb or other debugger). These are stored on disk separately from kernel itself, and are not read from running copy of kernel.

Related Question