Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've already finishing compiling the kernel from source,

but how to compile it with debug symbols,what additional steps to I need to take?

share|improve this question

closed as off topic by Michael Hampton, Dave M, mdpc, Ward, Khaled Jan 21 '13 at 8:30

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

You need CONFIG_DEBUG_INFO=y on the config.

More exactly, the question is Compile the kernel with debug info (DEBUG_INFO) [N/y/?] and it's under the Kernel debugging (DEBUG_KERNEL) [Y/n/?] header. You may need to enable some other option below this one to get to the right one.

share|improve this answer
How to debug the kernel with gdb after that? – yum Mar 24 '11 at 2:53
I found this on google but YMMV. – coredump Mar 24 '11 at 3:13
I've already compiled the kernel with CONFIG_DEBUG_INFO=y,but gdb /usr/src/linux- /proc/kcore still can't read symbols:Reading symbols from /usr/src/linux- debugging symbols found)...done. – yum Mar 25 '11 at 3:31 seems to be a solid guide to attaching the debugger to a kernel. – whitey04 Apr 30 '15 at 22:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.