
On 07/01/2013 04:37 AM, Wolfgang Denk wrote:
Dear TigerLiu@viatech.com.cn,
please do not top post / full quote.
In message FE7ADED5C2218B4786C09CD97DC4C49F9403F9@exchbj02.viatech.com.bj you wrote:
During debug u-boot with JTAG tools, maybe turning off optimizations was recommended.
Many people recommend many things. Even strange or non-working or incorrect or dangerous ones.
A while back I tried this for the Linux kernel, with similiar results. I just let it go without investigating further, guessing that maybe some tricks with compiler directives were incompatible with turning off optimization.
But there's a good motivation for wanting to turn off optimization. Single-stepping with a debugger at the C source level is almost useless. I've since gotten better at single-stepping at the assembly level while using the mixed c and assembly view of gdb.
Mike