delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/15/06:13:29

Date: Mon, 15 Nov 1999 11:38:21 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Adam Schrotenboer <ajschrotenboer AT lycosmail DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Debugging Rhide C++ Struct
In-Reply-To: <382F084E.53726670@lycosmail.com>
Message-ID: <Pine.SUN.3.91.991115113801.26969L-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 14 Nov 1999, Adam Schrotenboer wrote:

> Also, turn off optimizations, compile w/ -O0 as last argument.

I would advise against turning off optimizations when debugging.  The
reason for this is that the code generated by GCC without
optimizations is VERY different from the optimized code (also about 2
times slower).  So you are in effect debugging a different program.
Many bugs don't raise their ugly head until you recompile with
optimizations.  If you do that just before shipping your program, or
just before using it for production runs, you'd be in trouble.

I suggest to debug optimized programs.  Just be prepared to see the
execution thread jump a little bit out of order.  In my experience, it
never gets in the way of debugging.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019