Mail Archives: djgpp/1996/12/20/03:55:19
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 -