gdb -O2 will cause, when debugging, some variable can not be print,

we will see "optimized out"

 

dont use the -O2 option, every thing will be fine, but add O2 in makefile, will make the process run faster

 

gdb -O2

相关文章: