I use kgdb for kernel debugging and I have a problem with printing values.
I wanted to get information about parameters of function. (ex (gdb) p *page) But all I got was optimized out
I found that it happens due to compiler optimization. And they says changing kernel optimization level to Og would help.
But I don't know how to change it.
I changed toplevel Makefile like below.
703 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
704 KBUILD_CFLAGS += -Os
705 else
706 KBUILD_CFLAGS += -Og
707 endif
But, I got error during make.
scripts/Makefile.build:497: recipe for target 'fs/cifs' failed