From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Turning optimizations off
Date: Fri, 29 May 2009 11:12:48 -0400 [thread overview]
Message-ID: <4A1FFB70.9010400@ge.com> (raw)
In-Reply-To: <71DEA556544D7A4F9C6848402D8184340C45D7@usi01.ultsol.local>
Fahd Abidi wrote:
> Hello,
>
> I am debugging u-boot with a BDI and am running into a case where a
> variable gets optimized out. For the sake of debugging I am trying to
> turn off optimizations.
> I have the following in u-boot-2009.01/config.mk, but GDB still reports
> optimizations:
>
> OPTFLAGS= -Os -fno-schedule-insns -fno-schedule-insns2
> #-fomit-frame-pointer
>
> (gdb) stepi
>
> 0x0ff78750 in get_table_entry_name (table=<value optimized out>,
If you (temporarily) put "volatile" on the variable, the compiler should
not optimize it out. Obviously, this is a limited solution, but may get
your past your problem.
[snip]
> Does anyone know how to completely turn optimization off? Using no -O
> flag results in u-boot not compiling.
Theoretically, you could compile individual files w/o optimization (e.g.
if you compile it by hand, make shouldn't re-compile it). I doubt that
you want to go there, though...
> Fahd Abidi
Good luck,
gvb
prev parent reply other threads:[~2009-05-29 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 20:05 [U-Boot] Turning optimizations off Fahd Abidi
2009-05-28 22:04 ` Wolfgang Denk
2009-05-29 15:12 ` Jerry Van Baren [this message]
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=4A1FFB70.9010400@ge.com \
--to=gerald.vanbaren@ge.com \
--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