This is the mail archive of the gdb@sources.redhat.com 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: gdb shows source line multiple times before executing !!


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.

gdb --version command gives following output:
GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux".


Regards Mohanlal





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