From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Dunn Date: Mon, 01 Jul 2013 11:03:01 -0700 Subject: [U-Boot] compiled failed when turned off gcc optimazition In-Reply-To: <20130701113747.14BD9380DF7@gemini.denx.de> References: <20130701113747.14BD9380DF7@gemini.denx.de> Message-ID: <51D1C455.9010801@newsguy.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 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