This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Single stepping a simple C-program, but...


On Mon, May 19, 2008 at 10:18:36PM +0200, Peter Toft wrote:
> Why does the second "step" i.e. "s" take me BACK to line 7 after I have 
> been in line 8????

Probably because you compiled with optimization on.  The compiler
scheduled part of the call before the if was finished.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]