delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/13/10:55:06

Date: Tue, 13 Oct 1998 17:53:30 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: can't track variables in RHGDB
In-Reply-To: <ranla.7.0045FF7E@post.tau.ac.il>
Message-ID: <Pine.SUN.3.91.981013175311.4278M-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Thu, 8 Oct 1998, Tal Lavi wrote:

> >have GCC 2.8.1 installed, try compiling with -gstubs3 or -gstubs+ instead 
> >of -g, and see if the problems go away.
> 
> I haven't checked it thouroughly yet, but if I'm not mistaken, putting those 
> makes no difference,

Make sure you use -gstabs+, not gstubs+ as I erroneously wrote.

> disabling the optimization(-O2 -ffast-math) does!

That's not a solution.  Debugging a non-optimized program doesn't
help, since the code is very different, so you aren't debugging the
same program.

There should be no problems debugging an optimized program except that
some code rearrangement can take place (i.e., line N might be executed
after line N+10 or something), and some automatic variables could be
optimized out of existence (i.e., put into registers or discarded
altogether).  If this is your case, you will have to make special
arrangements, like evaluating expressions to find the value of missing
variables, to work around this.  (But I would still suggest not to go
back to debugging an unoptimized program.)  Last but not least, don't
forget that this could be a bug in GCC and/or GDB, so if you can't
solve it, submit a bug report.

- Raw text -


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