public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] How to debug u-boot?
Date: Mon, 09 Jun 2008 11:53:15 +0200	[thread overview]
Message-ID: <m2r6b72aus.fsf@ohwell.denx.de> (raw)
In-Reply-To: <200806060213.m562DaPR002810@mail.corelis.com> (Brian S. Park's message of "Thu, 05 Jun 2008 19:13:55 -0700")

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

  parent reply	other threads:[~2008-06-09  9:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-06  2:13 [U-Boot-Users] How to debug u-boot? Brian S. Park
2008-06-06  6:07 ` Alessandro Rubini
2008-06-06 16:34 ` Brian S. Park
2008-06-09  9:53 ` Detlev Zundel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-13  4:33 huasee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r6b72aus.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox