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: execution does not run in the source line's order


On Sat, 11 Aug 2012 05:14:41 +0200, rivers horse wrote:
>      I  debug gdb using itself,  i find  a strange  issue  :
>               the programme  being  debugged  execute  not in line
> order,for example,  it goes into  line 20,then it goes  into line 18 ,
>     which are simply assignment operations,
> 
>     what is the reasin for this?

You have probably compiled the file with -O2, use/force -O0 (gcc options).


Regards,
Jan


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