Hi I am not sure if anyone has figured out a way to disable compiler
optimization in UML kernels. I'm primarily using UML as a learning
tool and stepping through a running system in gdb. However a lot of
values are "optimized out" and I cannot access them.
To try to fix this, I have gone into the Makefile and replaced the
string -O2 with -O0. This fails to compile in 3.6.10:
n function ‘zap_pmd_range’,
inlined from ‘zap_pud_range’ at mm/memory.c:1281:8,
inlined from ‘unmap_page_range’ at mm/memory.c:1306:8:
mm/memory.c:1236:23: error: call to ‘__build_bug_failed’ declared with
attribute error: BUILD_BUG failed
make: *** [mm/memory.o] Error 1
make: *** [mm] Error 2
Replacing -O2 with -O compiles and creates a working kernel, but again
there are some optimizations that make using gdb harder.
I'm not sure if what I want to do is easy, but I appreciate any
advice. Thanks in advance for any help with this.