PDA

View Full Version : A question on GDB



shimmey
October 31st, 2008, 11:46 AM
I met a marvelous phenomenon. When I debug my c program with GDB step by step, the line numbers are incorrect!
It's always smaller 1 than the source code in gedit.
And when I run my program step by step, such code like "j++" was jumped.
Is it a normal phenomenon? Or there's something wrong?
I'm a new in GCC, who knows that?

SeanHodges
November 1st, 2008, 11:31 AM
Are you using GDB standalone, or with a plugin for gedit?

nvteighen
November 1st, 2008, 02:27 PM
I met a marvelous phenomenon. When I debug my c program with GDB step by step, the line numbers are incorrect!
It's always smaller 1 than the source code in gedit.
And when I run my program step by step, such code like "j++" was jumped.
Is it a normal phenomenon? Or there's something wrong?
I'm a new in GCC, who knows that?
Are you sure you recompiled your code?

shimmey
November 3rd, 2008, 08:45 AM
I was using a GDB standalone, not a plugin for gedit.
After modified the source code, I recompile the only one code file.
This problem exists anytime. Is it abnormal or not?