delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/20/03:55:19

From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Debugging in RHIDE
Date: Fri, 20 Dec 1996 09:16:45 +0100
Organization: Lehrstuhl fuer Stroemungsmechanik
Lines: 58
Message-ID: <32BA4B6D.2781@LSTM.Ruhr-UNI-Bochum.De>
References: <32BA324E DOT 5AA8 AT post DOT comstar DOT ru>
NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de
Mime-Version: 1.0
CC: zager AT post DOT comstar DOT ru
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Dim Zegebart wrote:
> 
> Hi,
> 
> I discover the odd problem with DEBUGGING in RHIDE
> (unfortunately i'm too stupid to use GDB :-(   )
> So, when i use -O3 and -g under Windows 3.11
> some local variables are not accessible for watching
> (<var name> : not available) and
> some lines are not accessible for stepping into
> (There is no code generated for this line).
> 
[...]
> 
> Is this broblem occure due to Windows 3.11 or i'm misunderstanding
> somethig important in info text?

Well, your problem is quite normal. It just means that
the optimizer came to the conclusion some of your variables
are either useless or important enough to be held in a 
register. 

For example, when I ported some fortran legacy code, 
I had something like

 pl = (GAMMA-1.)*(e_l - .5* u_l*u_l*rho_l);

and some 50 lines and several if's and while's later:

 pim = (GAMMA-1.)*(e_l - .5* u_l*u_l*rho_l);

pl was accessible, pim not, because the optimizer figured
out that this variable was pretty useless. And the debugger
skipped that line, because there is no point in re-computing
an unneeded value.



The bottom line is that you either do not use -O when 
debugging, or get some surprises when debugging optimized
code.


--
Ciao
Tom

*************************************************************
* Thomas Demmer                                             *
* Lehrstuhl fuer Stroemungsmechanik                         *
* Ruhr-Uni-Bochum                                           *
* Universitaetsstr. 150                                     *
* D-44780  Bochum                                           *
* Tel: +49 234 700 6434                                     *
* Fax: +49 234 709 4162                                     *
* Voice/Fax Box: +49 2561 91371 2056                        *
* http://www.lstm.ruhr-uni-bochum.de/~demmer                *
*************************************************************

- Raw text -


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