Reputation: 1942
When using gdb for debugging some code,it sometimes repeats some code fragments several times while using next command, after this repeat, with the n command, it continues sequentially over program lines normally. What is the reason of this strange behaviour? Or anyone had this problem before? What could be the fix for this? I have GNU gdb (GDB) 7.2-ubuntu.
Upvotes: 1
Views: 97
Reputation: 29001
Program may have been compiled using optimizations. Try again with -O0 when compiling.
Upvotes: 4