Why GCC/ GDB ignore a normal C statement?

Huaxia Zhao delzhao_linux@yahoo.com
Mon May 5 11:32:00 GMT 2003


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



More information about the Gdb mailing list