delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/20/07:59:56

From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: preprpcessor for overiding gcc optimation switch
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <suauks06rv8ivvhtus04su76sdtohqbtfj@4ax.com>
References: <Pine DOT LNX DOT 4 DOT 21 DOT 0006030531400 DOT 1081-100000 AT roadrunner DOT grendel DOT net> <83zop3o170 DOT fsf AT mercury DOT bitbucket> <25c58271 DOT fc969396 AT usw-ex0104-033 DOT remarq DOT com>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 25
X-Trace: /Kw5eCjjuZDQrkcheW6NL7jg5aZKBKiC+qY2RL5UoFw1sxILTxuOiqftUIWxl5T4MiZk+FT6y8md!KgJcI9ZO2AfL1QE0nj+MKOdwOPMxD0qNQ+QmS5f022rdt1PtgTPuNAReAtmVf9dBBH6YjWXUCyH0!83N2
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Tue, 20 Jun 2000 08:34:13 GMT
Distribution: world
Date: Tue, 20 Jun 2000 08:34:13 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Sun, 18 Jun 2000 13:09:49 -0700, batchex
<thedark1NOthSPAM AT phreaker DOT net DOT invalid> wrote:

>in one of my project, one (only one) of the source file, when
>compiled with optimation, then try to debug a function contained
>in that file in gdb, it will give errorneous results.

There is generally one main reason to turn off optimization in GCC:
when debugging your executable in GDB.  Optimization rearranges
instructions to better fit in a Pentium's pipeline; this throws GDB
off balance.

>It is solved if that particular source file is compiled without
>optimation.

Which is standard practice when using source debuggers such as GDB.
Eli could probably point you to a FAQ list entry with more info.

-- 
Damian Yerrick
"I refuse to listen to those who refuse to listen to reason."
See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html

This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/

- Raw text -


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