compile a kernel for kgdb with less "optimized out"

2012-08-09 Thread gaoqiang
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

compile a kernel for kgdb with less optimized out

2012-08-09 Thread gaoqiang
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