From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juan Antonio Garcia Redondo Date: Thu, 04 Sep 2003 17:46:16 +0200 Subject: [U-Boot-Users] u-boot debugging boot with gdb and bdi2000 in lubbock(PXA255) board References: <20030904141017.359B5C59E4@atlas.denx.de> Message-ID: <3F575E48.1060507@nabla-designs.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: >In message you wrote: > > >>I usually set TEXT_BASE=0 in board/lubbock/config.mk for debugging before >>start_armboot. No need to reflash. You should be able to reload symbols in >>gdb at offset 0, but for some reason I've never been able to get this to >>work correctly. So linking at 0 sets symbols for gdb correctly. Then you can >>use gdb in a normal manner. >> >> > >No need to recompile / relink. GDB will do the same when you use >"symbol-file" to delte the current ymbol table and "add-symbol-file" >to load the symbol file to the wanted target address (0x0). > > Thanks Wolfgang and Kyle for your advice. Now, I can debug the boot process from the first instruction. Finally I've created two binaries: u-boot to execute and u-boot.debug (with TEXTBASE=0x0), to debug the first part of boot process. When the boot process arrives to the start_armboot function, I discard the current symbol file(u-boot.debug) and load the new one(u-boot). Now, I have a new (minor) problem. The execution order which shows the gdb seems to be wrong (I`ve stopeed at the start_armboot funcion and the lines which show the gdb are different of the real execution). I suppose that it is a compiler optimization problem. Anyone knows which are the suitable flags to use with the compiler to avoid this behaviour ? Regards, Juan Antonio