From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Mon, 09 Jun 2008 11:53:15 +0200 Subject: [U-Boot-Users] How to debug u-boot? In-Reply-To: <200806060213.m562DaPR002810@mail.corelis.com> (Brian S. Park's message of "Thu, 05 Jun 2008 19:13:55 -0700") References: <200806060213.m562DaPR002810@mail.corelis.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Brian, > Hi every one. > I need help with debugging u-boot. If I comple u-Boot without -Os > optimization, I get bunch of errors about missing functions. They are > inline functions (in_be32, out_be32, out_8, etc) and I'm not sure how > to make sure they are included when building the code without optimization. > > I'm using ELDK4.1 for windows and u-Boot-1.3.3 > > Any help or pointers will be appreciated. You have seen by now, that you cannot disable all optimization to successfully build U-Boot (Linux is the same btw.). I still do wonder, why you want to disable optimization for debugging. Is it because GCC reorders some statements, so gdb seems to jump around in the source lines? If so, you can suppress the reordering as documented in our DULG[1]: Add "-fno-schedule-insns -fno-schedule-insns2" to the CFLAGS for U-Boot. Cheers Detlev [1] http://www.denx.de/wiki/view/DULG/DebuggingTricks -- Those who do not understand Unix are condemned to reinvent it, poorly. - Henry Spencer, University of Toronto Unix hack -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de