This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb shows source line multiple times before executing !!
Actully yes. I will try to figure out if this is only reason, but can you
explain why this happens if executable is optimized.
> the executable is probably optimized (gcc/g++ -O2 ...)
>
> mohanlal jangir wrote:
>
> >While single stepping with gdb, quite frequently I see sorce lines
appearing
> >multiple times i.e. gdb shows some line that will be executed on command
> >"next", but that is actully not. After next "next" command, I see same
line
> >appearing. This happens two or three times and then finally that line is
> >executed.