From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31834 invoked by alias); 6 May 2003 08:56:51 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31823 invoked from network); 6 May 2003 08:56:50 -0000 Received: from unknown (HELO ngate.noida.hcltech.com) (202.54.110.230) by sources.redhat.com with SMTP; 6 May 2003 08:56:50 -0000 Received: from exch-01.noida.hcltech.com (exch-01 [204.160.254.29]) by ngate.noida.hcltech.com (8.9.3/8.9.3) with ESMTP id OAA08335; Tue, 6 May 2003 14:22:53 +0530 Received: by exch-01.noida.hcltech.com with Internet Mail Service (5.5.2656.59) id ; Tue, 6 May 2003 14:19:18 +0530 Received: from [192.168.23.56] (192.168.23.56 [192.168.23.56]) by exch-01.noida.hcltech.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2656.59) id JT0HL6SC; Tue, 6 May 2003 14:19:12 +0530 From: "D.Venkatasubramanian, Noida" To: Huaxia Zhao Cc: gdb@sources.redhat.com Subject: Re: Why GCC/ GDB ignore a normal C statement? In-Reply-To: <20030505113250.55949.qmail@web20709.mail.yahoo.com> References: <20030505113250.55949.qmail@web20709.mail.yahoo.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Tue, 06 May 2003 08:56:00 -0000 Message-Id: <1052211765.4348.39.camel@albatross> Mime-Version: 1.0 X-SW-Source: 2003-05/txt/msg00067.txt.bz2 Hi, Did you use some optimization during compilation. If yes, then that could be the problem. Optimization should be used only for the final release. This is a common mistake made by new users. Venky On Mon, 2003-05-05 at 17:02, Huaxia Zhao wrote: > Hi: > > As a beginner of linux programming, I am learning to > recompile and rebuild my previous programs in Linux > with GCC/GDB. However, there is something really > annoying me. The code is showed as : > > if ( ( d_z - current ) < MIN_ERROR && ( d_z - current > ) > -MIN_ERROR) > { > d_z += dz_inc; > mp += mstep_k; > i_cz += step_k; > offset+= mstep_k; > } > some graphical front-ends of GDB like GVD show that > the statement > > i_cz +=step_k; > > is NOT recongnised as a statement. The GDB just > simpily ignores it when stepping to there. This > means the varible i_cz,which is declared as a register > int varible, has not updated after executing. The > contexts work well and this part of code runs > perfectlly when compiled with VC in Windows. > > Could someone give me an idea about this problem? I > would be very grateful... > > Frank Zhao > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. > http://search.yahoo.com