compile a kernel for kgdb with less "optimized out"

From: gaoqiang
Date: Thu Aug 09 2012 - 22:58:34 EST


I think those who use kgdb must hate this sentence "optimized out". I have tried many times to build a kernel with less optimization but failed. today,I found a trick method ,just get rid of the -O2 and -Os on the top level of the kernel source and add -O2 for the arch/x86 directory,it works !.I saw much "optimized out" now.

I build the kernel of centos6, with kernel 2.6.32. I don't know whether it works with kernel of other versions ,but it worth a try.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/