[U-Boot] compiled failed when turned off gcc optimazition

Mike Dunn mikedunn at newsguy.com
Mon Jul 1 20:03:01 CEST 2013


On 07/01/2013 04:37 AM, Wolfgang Denk wrote:
> Dear TigerLiu at viatech.com.cn,
> 
> please do not top post / full quote.
> 
> In message <FE7ADED5C2218B4786C09CD97DC4C49F9403F9 at 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



More information about the U-Boot mailing list