| | 365 | * 在 DEBUG 的時候偶爾會看到 <value optimized out>,但是該怎麼去掉呢?? |
| | 366 | * [參考] http://www.cs.utk.edu/~vose/c-stuff/onlinedocs/gdb_7.html |
| | 367 | {{{ |
| | 368 | The values of arguments that were not saved in their stack frames are shown as `<value optimized out>'. |
| | 369 | |
| | 370 | If you need to display the values of such optimized-out arguments, either deduce that from other variables whose values depend on the one you are interested in, or recompile without optimizations. |
| | 371 | }}} |
| | 372 | * [作法] 在 configure 的時候加上 CFLAGS |
| | 373 | * 註: 因為如果有設定 CFLAGS 的話,在 configure 裡是會直接採用我們提供的 CFLAGS。因此縱使加上 --enable-debug 也沒有用,configure 不會幫你加 -g 進去。 |
| | 374 | {{{ |
| | 375 | root@intrepid:~/jfbterm-0.4.7-dev# CFLAGS="-g -O0" ./configure |
| | 376 | }}} |