From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Debugging in RHIDE Date: Fri, 20 Dec 1996 18:19:44 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 32 Message-ID: <32BB4940.1753@cs.com> References: <32BA324E DOT 5AA8 AT post DOT comstar DOT ru> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp208.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: zager AT post DOT comstar DOT ru 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 > ( : 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 | ---------------------------------------------------------------------