Mail Archives: djgpp/1996/12/20/19:47:42
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).
The problem is that you are using -O3, as opposed to one of the lower
optimization settings. Certainly, gcc will optimize away some code and
variables if you use -O or -O2, but -O3 specifically requests loop
unrolling, function inlining, and similar options that are virtually
guaranteed to alter your code.
A partial solution would be to compile with -O2 only. -O3 is rarely
needed unless you _really_ need speed; it tends to severely bloat code
and doesn't always speed it up significantly. If you are using code
which must be inlined, it will still be inlined as long as you specify
any level of optimizations, even just '-O'. (AFAIK)
Good luck!
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com |
| Proud owner of what might one | http://www.cs.com/fighteer |
| day be a spectacular MUD... | Plan: To make Bill Gates suffer |
---------------------------------------------------------------------
- Raw text -